Fix about window not centering when window is resized if no ISO/Project is specified

This commit is contained in:
Phillip Stephens 2022-02-04 21:19:28 -08:00
parent 41dc1b2cde
commit 18cb40268a
Signed by: Antidote
GPG Key ID: F8BEE4C83DACA60D
1 changed files with 1 additions and 1 deletions

View File

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