mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 13:08:47 +02:00
BeginPopupModal() doesn't set the ImGuiWindowFlags_NoSavedSettings flag anymore, and will not always be auto-centered. (#915, #3091)
# Conflicts: # imgui.cpp
This commit is contained in:
@ -2922,6 +2922,10 @@ static void ShowDemoWindowPopups()
|
||||
if (ImGui::Button("Delete.."))
|
||||
ImGui::OpenPopup("Delete?");
|
||||
|
||||
// Always center this window when appearing
|
||||
ImVec2 center(ImGui::GetIO().DisplaySize.x * 0.5f, ImGui::GetIO().DisplaySize.y * 0.5f);
|
||||
ImGui::SetNextWindowPos(center, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f));
|
||||
|
||||
if (ImGui::BeginPopupModal("Delete?", NULL, ImGuiWindowFlags_AlwaysAutoResize))
|
||||
{
|
||||
ImGui::Text("All those beautiful files will be deleted.\nThis operation cannot be undone!\n\n");
|
||||
|
Reference in New Issue
Block a user