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

Using BeginMenu without a menu bar: menu popups stays open #1633

Closed
elliotjb opened this issue Feb 20, 2018 · 3 comments
Closed

Using BeginMenu without a menu bar: menu popups stays open #1633

elliotjb opened this issue Feb 20, 2018 · 3 comments
Labels
menus menu bars, menu items

Comments

@elliotjb
Copy link

elliotjb commented Feb 20, 2018

Hi, i create a Engine3D with ImGui and i have a problem with ImGui::MenuItem and ImGui::BeginMenu.
(imgui, v1.53)
Look gif:

https://gyazo.com/4b2734e99c690211590ac1396655bea4

This is in code:
https://github.com/Project3CITM/CulverinEngine-Project3/blob/master/Engine/GameObject.cpp#L1008

https://gyazo.com/071c8e3aac09833d8261d601c4d0193d

I use these functions in other parts of engine and I haven't any problems. I dont know what to do.
I suppose that i used incorrectly form ImGui::MenuItem.

From Imgui.cpp I have only created some functions to create buttons with text below.

Thanks,

Elliot JB

@ocornut ocornut added the menus menu bars, menu items label Feb 20, 2018
@ocornut
Copy link
Owner

ocornut commented Feb 20, 2018

FYI, this is currently happening when you create menus from outside of a menu bar.

It's not a 10 minutes fix unfortunately, because BeginMenu() is really tricky and this improve bypassing the mechanism that inhibit hovering on the parent of a popup. I know of various "fixes" that would break something else, and the right fix will take a bit of research to find.

I'll look into it at some point.

@elliotjb
Copy link
Author

Thank you very much for the speed, for now I will remove the BeginMenu() and put them with MenuItem().

I'll be attentive to what you find, thanks.

@ocornut ocornut changed the title Can't exit from ImGui::BeginMenu(...) Using BeginMenu without a menu bar: menu popups stays open Aug 27, 2020
@ocornut
Copy link
Owner

ocornut commented Jan 4, 2022

Forgot to mention but AFAIK this was fixed in 1.86 by the series of change done for #3496 and #4797.

@ocornut ocornut closed this as completed Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
menus menu bars, menu items
Projects
None yet
Development

No branches or pull requests

2 participants