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

Suggestion: auto-scroll Options sub-menu to top when open #6

Open
hsandt opened this issue Apr 26, 2023 · 0 comments
Open

Suggestion: auto-scroll Options sub-menu to top when open #6

hsandt opened this issue Apr 26, 2023 · 0 comments

Comments

@hsandt
Copy link

hsandt commented Apr 26, 2023

At small windowed resolution, the Options menu starts scrolled a little down (not sure why), and it also retains its last scroll value when closed and reopened.

We could auto-scroll it to the top each time it is open (if desirable, we could add a dev option flag for that).

Adding this code in options_menu_controller.gd > on_open:

$MarginContainer/ScrollContainer.scroll_vertical = 0.0

makes it work. To be cleaner, of course, we may want to store it in some member first:

@onready var scroll_container : ScrollContainer = $%ScrollContainer

and make ScrollContainer accessible as Unique Name so % works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant