mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-12 00:14:20 +00:00
Nav: Allow PadLeft to close a menu (#323)
This commit is contained in:
parent
c203be94c6
commit
e55882f74b
1 changed files with 5 additions and 0 deletions
|
|
@ -9779,6 +9779,11 @@ bool ImGui::BeginMenu(const char* label, bool enabled)
|
|||
want_open = true;
|
||||
g.NavMoveRequest = false;
|
||||
}
|
||||
if (g.NavWindow && g.NavWindow->ParentWindow == window && g.NavMoveRequest && g.NavMoveDir == ImGuiNavDir_Left) // Nav-Left to close
|
||||
{
|
||||
want_close = true;
|
||||
g.NavMoveRequest = false;
|
||||
}
|
||||
}
|
||||
else if (menu_is_open && pressed && menuset_is_open) // Menu bar: click an open menu again to close it
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue