mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-18 14:16:36 +00:00
Nav: Fixed NavDown to open menu from a menu bar (#787)
This commit is contained in:
parent
35f65e05ed
commit
2a8eb618dc
@ -10039,6 +10039,7 @@ bool ImGui::BeginMenu(const char* label, bool enabled)
|
|||||||
else if (g.NavId == id && g.NavMoveRequest && g.NavMoveDir == ImGuiDir_Down) // Menu bar: Nav-Down to open
|
else if (g.NavId == id && g.NavMoveRequest && g.NavMoveDir == ImGuiDir_Down) // Menu bar: Nav-Down to open
|
||||||
{
|
{
|
||||||
g.NavMoveRequest = false;
|
g.NavMoveRequest = false;
|
||||||
|
want_open = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!enabled) // explicitly close if an open menu becomes disabled, facilitate users code a lot in pattern such as 'if (BeginMenu("options", has_object)) { ..use object.. }'
|
if (!enabled) // explicitly close if an open menu becomes disabled, facilitate users code a lot in pattern such as 'if (BeginMenu("options", has_object)) { ..use object.. }'
|
||||||
|
Loading…
Reference in New Issue
Block a user