|
@@ -3858,7 +3858,7 @@ bool ImGui::BeginPopupEx(ImGuiID id, ImGuiWindowFlags extra_flags)
|
|
|
return is_open;
|
|
|
}
|
|
|
|
|
|
-bool ImGui::BeginPopup(const char* str_id, ImGuiWindowFlags extra_flags)
|
|
|
+bool ImGui::BeginPopup(const char* str_id, ImGuiWindowFlags flags)
|
|
|
{
|
|
|
ImGuiContext& g = *GImGui;
|
|
|
if (g.OpenPopupStack.Size <= g.CurrentPopupStack.Size) // Early out for performance
|
|
@@ -3866,7 +3866,7 @@ bool ImGui::BeginPopup(const char* str_id, ImGuiWindowFlags extra_flags)
|
|
|
g.NextWindowData.Clear(); // We behave like Begin() and need to consume those values
|
|
|
return false;
|
|
|
}
|
|
|
- return BeginPopupEx(g.CurrentWindow->GetID(str_id), extra_flags|ImGuiWindowFlags_AlwaysAutoResize|ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoSavedSettings);
|
|
|
+ return BeginPopupEx(g.CurrentWindow->GetID(str_id), flags|ImGuiWindowFlags_AlwaysAutoResize|ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoSavedSettings);
|
|
|
}
|
|
|
|
|
|
bool ImGui::IsPopupOpen(ImGuiID id)
|
|
@@ -3881,7 +3881,7 @@ bool ImGui::IsPopupOpen(const char* str_id)
|
|
|
return g.OpenPopupStack.Size > g.CurrentPopupStack.Size && g.OpenPopupStack[g.CurrentPopupStack.Size].PopupId == g.CurrentWindow->GetID(str_id);
|
|
|
}
|
|
|
|
|
|
-bool ImGui::BeginPopupModal(const char* name, bool* p_open, ImGuiWindowFlags extra_flags)
|
|
|
+bool ImGui::BeginPopupModal(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|
|
{
|
|
|
ImGuiContext& g = *GImGui;
|
|
|
ImGuiWindow* window = g.CurrentWindow;
|
|
@@ -3896,8 +3896,7 @@ bool ImGui::BeginPopupModal(const char* name, bool* p_open, ImGuiWindowFlags ext
|
|
|
if (g.NextWindowData.PosCond == 0)
|
|
|
SetNextWindowPos(g.IO.DisplaySize * 0.5f, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
|
|
|
|
|
|
- ImGuiWindowFlags flags = extra_flags|ImGuiWindowFlags_Popup|ImGuiWindowFlags_Modal|ImGuiWindowFlags_NoCollapse|ImGuiWindowFlags_NoSavedSettings;
|
|
|
- bool is_open = Begin(name, p_open, flags);
|
|
|
+ bool is_open = Begin(name, p_open, flags | ImGuiWindowFlags_Popup | ImGuiWindowFlags_Modal | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoSavedSettings);
|
|
|
if (!is_open || (p_open && !*p_open)) // NB: is_open can be 'false' when the popup is completely clipped (e.g. zero size display)
|
|
|
{
|
|
|
EndPopup();
|