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:
omar
2020-06-23 17:52:13 +02:00
parent 76e40fe5d1
commit a616ff5d4a
3 changed files with 14 additions and 4 deletions

View File

@ -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");