diff --git a/imgui.cpp b/imgui.cpp index b3dcda0..c840ba7 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -3052,11 +3052,11 @@ ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f); ImGuiWindowFlags flags = ImGuiWindowFlags_Popup|ImGuiWindowFlags_ShowBorders|ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoSavedSettings|ImGuiWindowFlags_AlwaysAutoResize; flags |= extra_flags; - if ((flags & ImGuiWindowFlags_Menu)) + if ((flags & ImGuiWindowFlags_ChildMenu)) flags |= ImGuiWindowFlags_ChildWindow; char name[32]; - if (flags & ImGuiWindowFlags_Menu) + if (flags & ImGuiWindowFlags_ChildMenu) ImFormatString(name, 20, "##menu_%d", g.CurrentPopupStack.size()); // Recycle windows based on depth else ImFormatString(name, 20, "##popup_%08x", id); // Not recycling, so we can close/open during the same frame @@ -3506,7 +3506,7 @@ } // Position popup - if (flags & ImGuiWindowFlags_Menu) + if (flags & ImGuiWindowFlags_ChildMenu) { IM_ASSERT(window_pos_set_by_api); ImRect rect_to_avoid; @@ -7283,7 +7283,7 @@ RenderTextClipped(bb.Min, label, NULL, &label_size, bb_with_spacing.Max); // Automatically close popups - if (pressed && (window->Flags & ImGuiWindowFlags_Menu)) + if (pressed && (window->Flags & ImGuiWindowFlags_ChildMenu)) CloseAllPopups(); else if (pressed && (window->Flags & ImGuiWindowFlags_Popup)) ImGui::CloseCurrentPopup(); @@ -7520,7 +7520,7 @@ if (opened) { ImGui::SetNextWindowPos(popup_pos, ImGuiSetCond_Always); - opened = BeginPopupEx(label, ImGuiWindowFlags_Menu); // opened can be 'false' when the popup is completely clipped (e.g. zero size display) + opened = BeginPopupEx(label, ImGuiWindowFlags_ChildMenu); // opened can be 'false' when the popup is completely clipped (e.g. zero size display) } return opened; diff --git a/imgui.cpp b/imgui.cpp index b3dcda0..c840ba7 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -3052,11 +3052,11 @@ ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f); ImGuiWindowFlags flags = ImGuiWindowFlags_Popup|ImGuiWindowFlags_ShowBorders|ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoMove|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoSavedSettings|ImGuiWindowFlags_AlwaysAutoResize; flags |= extra_flags; - if ((flags & ImGuiWindowFlags_Menu)) + if ((flags & ImGuiWindowFlags_ChildMenu)) flags |= ImGuiWindowFlags_ChildWindow; char name[32]; - if (flags & ImGuiWindowFlags_Menu) + if (flags & ImGuiWindowFlags_ChildMenu) ImFormatString(name, 20, "##menu_%d", g.CurrentPopupStack.size()); // Recycle windows based on depth else ImFormatString(name, 20, "##popup_%08x", id); // Not recycling, so we can close/open during the same frame @@ -3506,7 +3506,7 @@ } // Position popup - if (flags & ImGuiWindowFlags_Menu) + if (flags & ImGuiWindowFlags_ChildMenu) { IM_ASSERT(window_pos_set_by_api); ImRect rect_to_avoid; @@ -7283,7 +7283,7 @@ RenderTextClipped(bb.Min, label, NULL, &label_size, bb_with_spacing.Max); // Automatically close popups - if (pressed && (window->Flags & ImGuiWindowFlags_Menu)) + if (pressed && (window->Flags & ImGuiWindowFlags_ChildMenu)) CloseAllPopups(); else if (pressed && (window->Flags & ImGuiWindowFlags_Popup)) ImGui::CloseCurrentPopup(); @@ -7520,7 +7520,7 @@ if (opened) { ImGui::SetNextWindowPos(popup_pos, ImGuiSetCond_Always); - opened = BeginPopupEx(label, ImGuiWindowFlags_Menu); // opened can be 'false' when the popup is completely clipped (e.g. zero size display) + opened = BeginPopupEx(label, ImGuiWindowFlags_ChildMenu); // opened can be 'false' when the popup is completely clipped (e.g. zero size display) } return opened; diff --git a/imgui.h b/imgui.h index 44bb87d..ea344f0 100644 --- a/imgui.h +++ b/imgui.h @@ -466,7 +466,7 @@ ImGuiWindowFlags_ComboBox = 1 << 23, // Don't use! For internal use by ComboBox() ImGuiWindowFlags_Tooltip = 1 << 24, // Don't use! For internal use by BeginTooltip() ImGuiWindowFlags_Popup = 1 << 25, // Don't use! For internal use by BeginPopup() - ImGuiWindowFlags_Menu = 1 << 26 // Don't use! For internal use by BeginMenu() + ImGuiWindowFlags_ChildMenu = 1 << 26 // Don't use! For internal use by BeginMenu() };