mirror of
https://github.com/Drezil/imgui.git
synced 2025-04-09 04:34:00 +00:00
BeginPopupModal(): the conditional test for SetNextWindowPos() was polling the wrong window, which in practice made the test succeed all the time.
This commit is contained in:
parent
e985baa35d
commit
90ff4ae5d1
@ -3885,7 +3885,7 @@ bool ImGui::BeginPopupModal(const char* name, bool* p_open, ImGuiWindowFlags ext
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Center modal windows by default
|
// Center modal windows by default
|
||||||
if ((window->SetWindowPosAllowFlags & g.SetNextWindowPosCond) == 0)
|
if (g.SetNextWindowPosCond == 0)
|
||||||
SetNextWindowPos(g.IO.DisplaySize * 0.5f, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
|
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;
|
ImGuiWindowFlags flags = extra_flags|ImGuiWindowFlags_Popup|ImGuiWindowFlags_Modal|ImGuiWindowFlags_NoCollapse|ImGuiWindowFlags_NoSavedSettings;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user