|
|
|
@ -8276,7 +8276,7 @@ void ImGui::CloseCurrentPopup() |
|
|
|
|
window->DC.NavHideHighlightOneFrame = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool ImGui::BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_flags) |
|
|
|
|
bool ImGui::BeginPopupEx(ImGuiID id, ImGuiWindowFlags flags) |
|
|
|
|
{ |
|
|
|
|
ImGuiContext& g = *GImGui; |
|
|
|
|
if (!IsPopupOpen(id)) |
|
|
|
@ -8286,12 +8286,13 @@ bool ImGui::BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_flags) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
char name[20]; |
|
|
|
|
if (extra_flags & ImGuiWindowFlags_ChildMenu) |
|
|
|
|
if (flags & ImGuiWindowFlags_ChildMenu) |
|
|
|
|
ImFormatString(name, IM_ARRAYSIZE(name), "##Menu_%02d", g.BeginPopupStack.Size); // Recycle windows based on depth
|
|
|
|
|
else |
|
|
|
|
ImFormatString(name, IM_ARRAYSIZE(name), "##Popup_%08x", id); // Not recycling, so we can close/open during the same frame
|
|
|
|
|
|
|
|
|
|
bool is_open = Begin(name, NULL, extra_flags | ImGuiWindowFlags_Popup); |
|
|
|
|
flags |= ImGuiWindowFlags_Popup | ImGuiWindowFlags_NoDocking; |
|
|
|
|
bool is_open = Begin(name, NULL, flags); |
|
|
|
|
if (!is_open) // NB: Begin can return false when the popup is completely clipped (e.g. zero size display)
|
|
|
|
|
EndPopup(); |
|
|
|
|
|
|
|
|
@ -8306,7 +8307,7 @@ bool ImGui::BeginPopup(const char* str_id, ImGuiWindowFlags flags) |
|
|
|
|
g.NextWindowData.ClearFlags(); // We behave like Begin() and need to consume those values
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
flags |= ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoDocking; |
|
|
|
|
flags |= ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoSavedSettings; |
|
|
|
|
return BeginPopupEx(g.CurrentWindow->GetID(str_id), flags); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|