From 4bd43bdb352f6ac88033eefbb10c260aa6a2c69f Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 17 May 2015 22:28:57 +0100 Subject: [PATCH] Renamed ImGuiWindowFlags_Menu to ImGuiWindowFlags_ChildMenu --- imgui.cpp | 10 +++++----- imgui.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index b3dcda0d..c840ba73 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -3052,11 +3052,11 @@ static bool BeginPopupEx(const char* str_id, ImGuiWindowFlags extra_flags) 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 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_ } // 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 @@ static bool SelectableEx(const char* label, bool selected, const ImVec2& size_ar 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 @@ bool ImGui::BeginMenu(const char* label) 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 44bb87dd..ea344f02 100644 --- a/imgui.h +++ b/imgui.h @@ -466,7 +466,7 @@ enum ImGuiWindowFlags_ 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() };