mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-07 21:39:54 +02:00
Menus: Separate menu sets by nav layer. (#3496, #4797) + Demo: Remove incorrect and useless suggestion to use PushID().
Fixes a common case where opening menu in one nav layer and hovering a menu in another nav layer would open that menu without a click.
This commit is contained in:
@ -6071,6 +6071,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
||||
{
|
||||
ImGuiPopupData& popup_ref = g.OpenPopupStack[g.BeginPopupStack.Size];
|
||||
popup_ref.Window = window;
|
||||
popup_ref.ParentNavLayer = parent_window_in_stack->DC.NavLayerCurrent;
|
||||
g.BeginPopupStack.push_back(popup_ref);
|
||||
window->PopupId = popup_ref.PopupId;
|
||||
}
|
||||
|
Reference in New Issue
Block a user