You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Back-ends: imgui_impl_glew.cpp + imgui_impl_opengl3.cpp
Operating System: Linux
My Issue/Question:
In my program, I can call BeginMainMenuBar and BeginMenu multiple times, and the menu items I add are automatically combined. Neat! But the keyboard navigation is working weird in this case. In the example below I add 4 menu items in two different locations. If I open the menu and start pressing the down button, the selection goes to a, b then it wraps back to a. If I press up, I get to d and actually only pressing the up button I can go through the whole menu, but not in the other direction. Also if I press down while d is selected, nothing happens.
The comment in imgui.h says "Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it." so I suppose this is a supported operation, and it works fine with mouse.
Screenshots/Video
Standalone, minimal, complete and verifiable example:
if (ImGui::BeginMainMenuBar())
{
if (ImGui::BeginMenu("Menu"))
{
ImGui::MenuItem("a");
ImGui::MenuItem("b");
ImGui::EndMenu();
}
ImGui::EndMainMenuBar();
}
if (ImGui::BeginMainMenuBar())
{
if (ImGui::BeginMenu("Menu"))
{
ImGui::MenuItem("c");
ImGui::MenuItem("d");
ImGui::EndMenu();
}
ImGui::EndMainMenuBar();
}
The text was updated successfully, but these errors were encountered:
…multiple appending calls to BeginMenu()/EndMenu() or BeginPopup/EndPopup(). (#3223, #1207)
First call to EndPopup() called NavRequestTryWrapWindow() which performed wrap-around operation while we were not done composing menu. This resulted in navigation wrapping around to first item.
Since wrap-around operation is only valid in last call to EndPopup() and there is no way to know which call is last - this operation is delayed to the end of the frame.
Version/Branch of Dear ImGui:
Version: 1.77
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_glew.cpp + imgui_impl_opengl3.cpp
Operating System: Linux
My Issue/Question:
In my program, I can call BeginMainMenuBar and BeginMenu multiple times, and the menu items I add are automatically combined. Neat! But the keyboard navigation is working weird in this case. In the example below I add 4 menu items in two different locations. If I open the menu and start pressing the down button, the selection goes to
a
,b
then it wraps back toa
. If I press up, I get tod
and actually only pressing the up button I can go through the whole menu, but not in the other direction. Also if I press down whiled
is selected, nothing happens.The comment in
imgui.h
says "Use BeginMenu() to create a menu. You can call BeginMenu() multiple time with the same identifier to append more items to it." so I suppose this is a supported operation, and it works fine with mouse.Screenshots/Video
Standalone, minimal, complete and verifiable example:
The text was updated successfully, but these errors were encountered: