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

Keep submenus open until another one is hovered #3055

Merged
merged 2 commits into from Jan 7, 2024

Conversation

DannyStoll1
Copy link
Contributor

This tiny change removes the trigger for a submenu to close if the mouse is no longer hovering over it or one of its children. Now, the menu stays open until a different menu item is selected. This aims to address #2853.

I suspected that a new trigger would need to be implemented so that multiple menu items don't remain open simultaneously, but after some testing, this does not appear to occur.

This change leaves MenuState::hovering_current_submenu and MenuState::close_submenu as dead code in case they might be useful later.

Copy link
Owner

@emilk emilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for the fix! I think we should remove the dead code though. We can always revert it if we want it again.

@emilk emilk added the egui label Jan 7, 2024
@emilk emilk merged commit 128afdd into emilk:master Jan 7, 2024
19 of 20 checks passed
@emilk emilk changed the title Changed logic for submenus closing Keep submenus open until another one is hovered Jan 8, 2024
emilk added a commit that referenced this pull request Mar 13, 2024
emilk added a commit that referenced this pull request Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants