From 18cb40268acca8ce79b6818e96f4d24efe363324 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Fri, 4 Feb 2022 21:19:28 -0800 Subject: [PATCH] Fix about window not centering when window is resized if no ISO/Project is specified --- Runtime/ImGuiConsole.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/ImGuiConsole.cpp b/Runtime/ImGuiConsole.cpp index 9b5d21378..c55a95a37 100644 --- a/Runtime/ImGuiConsole.cpp +++ b/Runtime/ImGuiConsole.cpp @@ -597,7 +597,7 @@ void ImGuiConsole::ShowConsoleVariablesWindow() { void ImGuiConsole::ShowAboutWindow(bool canClose, std::string_view errorString) { // Center window ImVec2 center = ImGui::GetMainViewport()->GetCenter(); - ImGui::SetNextWindowPos(center, ImGuiCond_Appearing, ImVec2(0.5f, 0.5f)); + ImGui::SetNextWindowPos(center, canClose ? ImGuiCond_Appearing : ImGuiCond_Always, ImVec2(0.5f, 0.5f)); ImVec4& windowBg = ImGui::GetStyle().Colors[ImGuiCol_WindowBg]; ImGui::PushStyleColor(ImGuiCol_TitleBg, windowBg);