Skip to content

Keep submenus open until another one is hovered - #3055

Merged
emilk merged 2 commits into
emilk:masterfrom
DannyStoll1:modify_submenu_behavior
Jan 7, 2024
Merged

emilk merged 2 commits into
emilk:masterfrom
DannyStoll1:modify_submenu_behavior

Conversation

@DannyStoll1

Copy link
Copy Markdown
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.

@emilk emilk left a comment

Copy link
Copy Markdown
Owner

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
@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
hacknus pushed a commit to hacknus/egui that referenced this pull request Oct 30, 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.

2 participants