-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Submenus not closing when hovering something else in the menu #5546
Comments
We have intentionally logic in place that doesn't close a child-menu if you are moving toward it. This allows for menus to open/close without delay. The way this logic works is currently not perfect.
But I have to ask you if you reported that as a curiosity you noticed but if you genuinely felt the interaction was problematic in your daily usage? |
Thanks for your response ! I understand the purpose of the logic, but in the case I am, it is more a problem. Right now the BeginMenu doesn't take any other parameters than its label and its enablement, so an alternative could be to add a flag when we want to disable this behaviour ? |
Why ? Always explain why otherwise I'll assume this is a XY Problem question. |
The menus I'm working on is to preview windows as submenus, that will open as real windows when clicking on the submenu item. We wanted to create that delay to avoid previewing the window at the first frame, but after the user keep the mouse during that delay. |
I don't think you need to use |
Oh yes, a selectable can totally do the work indeed, I just need to see how the submenu position is computed to recreate this for my tooltip. Thanks for the advice. |
… WIP) (#2517, #5614, noticed in #5546) Amend bda2cde Fixes the case where following menu hover sequence results in incorrect RestoreNavWindow (previously SourceWindow) pointing to opened sub-menu: 1. Hover "Menu -> Options" - Open ##Menu_01 window 2. Hover "Menu -> Colors" - SourceWindow incorrectly points to ##Menu_01 window
Version/Branch of Dear ImGui:
Version: 1.89 WIP
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Operating System: W11
My Issue:
When menu have submenus, the submenu is not always closed when moving from the submenu item to another item.
This often happens when we move the cursor slowly from the submenu item to the other item.
Screenshots/Video
The text was updated successfully, but these errors were encountered: