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

[3.x] Make popup menus focus items automatically when not using the mouse #57643

Merged
merged 1 commit into from
Feb 10, 2022

Conversation

YeldhamDev
Copy link
Member

Port of #56992 and #42843.

@akien-mga akien-mga merged commit 0c7c640 into godotengine:3.x Feb 10, 2022
@akien-mga
Copy link
Member

Thanks!

@YeldhamDev YeldhamDev deleted the smarter_pm_focus_port branch February 10, 2022 16:21
@RodZill4
Copy link
Contributor

RodZill4 commented Jun 3, 2022

@YeldhamDev Hi! I have a problem with that change (but not fully investigated yet, so it's probably my fault). My project (Material Maker) has dynamic menus (built upon "about to show" events) and some are huge. When a dynamic submenu that is taller than the viewport is shown, it blinks and becomes unusable.
It seems moving the pm->popup() statement line 182 to before the if statement (where it was before your change) solves the problem. But for sure it's not the solution.
I tried to modify the code to display autohide areas, they are wrong (don't take into account that the submenu, being tall, is not placed next to the submenu entry). So the submenu item is in autohide zone, and that's why the menu blinks.
Weird thing is I tried to build a minimal example (dynamic tall menus) and it works fine. So I'm probably doing something wrong in Material Maker. Any clue? Something must be done in my gdscript code after filling the popup menu, maybe?
BTW, tall menus don't seem to scroll when navigating with keys.
(that comment is a mess, sorry)

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

Successfully merging this pull request may close these issues.

None yet

4 participants