Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scroll_to_line does not work while scroll active is disabled #36134

Closed
Tracked by #39144
MoonsPod opened this issue Feb 12, 2020 · 6 comments · Fixed by #36366
Closed
Tracked by #39144

scroll_to_line does not work while scroll active is disabled #36134

MoonsPod opened this issue Feb 12, 2020 · 6 comments · Fixed by #36366
Milestone

Comments

@MoonsPod
Copy link

MoonsPod commented Feb 12, 2020

(3.2.stable.official) For Rich Text Label, If scroll_active is False, scroll_to_line(n) does not scroll to the line number given. Despite the on hover message for Scroll Active in the Inspector saying 'Setting this to false does not block scrolling completely. See scroll_to_line()'

@dreamsComeTrue
Copy link
Contributor

dreamsComeTrue commented Feb 15, 2020

Are you using _ready() func to perform that scrolling? Like:

func _ready():
	$RichTextLabel.scroll_to_line(4)

I've tried to replicate it - and even I've disabled scrolling, I am still able to offset it with above code.
Could you record simple GIF with issue? Or prepare simple project which reproduces that error?

@MoonsPod
Copy link
Author

MoonsPod commented Feb 15, 2020

Im changing the line on a timer timeout

func _on_LineChange_timeout():
	if globals.level != 0:
		linecred += 1
		linelist += 1
		$Credits.scroll_to_line(linecred)
		$Results/TimeList.scroll_to_line(linelist)
		$Results/DeathsList.scroll_to_line(linelist)
		if linecred >= 36:
			$Credits.scroll_to_line(0)
			linecred = 0
		if linelist >= n - 5:
			$Results/TimeList.scroll_to_line(0)
			$Results/DeathsList.scroll_to_line(0)
			linelist = 0
	else:
		print("Looks like ya hecked up mister")

Heres a video, the list of times/deaths would scroll down until it reached the end then reset and 'credits' would scroll up the bottom area on the previous version of Godot. Was functioning fine before i updated :x hope i'm not making a silly mistake here now ive posted this.

@dreamsComeTrue
Copy link
Contributor

Are you able to reproduce that issue with similar setup as mine?
demo

@MoonsPod
Copy link
Author

MoonsPod commented Feb 16, 2020

The issue comes when Scroll Active in Rich Text Label is set false (when scroll bar is hidden) the on hover message for Scroll Active says if false 'does not block scrolling completely. see scroll_to_line' https://streamable.com/37hl6

@dreamsComeTrue
Copy link
Contributor

OK, I've got it now. It was actually connected with other issue reported back then - please go to my PR to find out more :)

@KoBeWi
Copy link
Member

KoBeWi commented Jun 3, 2020

This seems to work correctly in 3.2.2 beta3.

EDIT:
Nevermind, I tested incorrectly.

dreamsComeTrue added a commit to dreamsComeTrue/godot that referenced this issue Jun 3, 2020
@akien-mga akien-mga added this to the 4.0 milestone Jun 3, 2020
akien-mga pushed a commit to akien-mga/godot that referenced this issue Jun 4, 2020
huhund pushed a commit to huhund/godot that referenced this issue Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants