diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 947f1cce31..a13d8f6700 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -13,6 +13,7 @@ - Fix: [#26903] Making a ride visible or invisible is always denied in multiplayer. - Fix: [#26917] Tile Inspector does not show indestructible track status correctly when ‘Make all track pieces destructible’ cheat is enabled. - Fix: [#26921] The bottom panel buttons for finances, park rating, date, etc. are not invalidating properly. +- Fix: [#26935] Windows opened on the title screen do not ‘flash’ around the edges when bringing them back into focus. 0.5.4 (2026-08-02) ------------------------------------------------------------------------ diff --git a/src/openrct2-ui/windows/TitleMenu.cpp b/src/openrct2-ui/windows/TitleMenu.cpp index 371d3aca7e..28afff6616 100644 --- a/src/openrct2-ui/windows/TitleMenu.cpp +++ b/src/openrct2-ui/windows/TitleMenu.cpp @@ -125,19 +125,12 @@ namespace OpenRCT2::Ui::Windows void onMouseUp(WidgetIndex widgetIndex) override { - WindowBase* windowToOpen = nullptr; - auto* windowMgr = GetWindowManager(); switch (widgetIndex) { case WIDX_START_NEW_GAME: - windowToOpen = windowMgr->FindByClass(WindowClass::scenarioSelect); - if (windowToOpen != nullptr) - { - windowMgr->BringToFront(*windowToOpen); - } - else + if (windowMgr->BringToFrontByClass(WindowClass::scenarioSelect) == nullptr) { windowMgr->CloseByClass(WindowClass::loadsave); windowMgr->CloseByClass(WindowClass::serverList); @@ -145,12 +138,7 @@ namespace OpenRCT2::Ui::Windows } break; case WIDX_CONTINUE_SAVED_GAME: - windowToOpen = windowMgr->FindByClass(WindowClass::loadsave); - if (windowToOpen != nullptr) - { - windowMgr->BringToFront(*windowToOpen); - } - else + if (windowMgr->BringToFrontByClass(WindowClass::loadsave) == nullptr) { windowMgr->CloseByClass(WindowClass::scenarioSelect); windowMgr->CloseByClass(WindowClass::serverList); @@ -159,12 +147,7 @@ namespace OpenRCT2::Ui::Windows } break; case WIDX_MULTIPLAYER: - windowToOpen = windowMgr->FindByClass(WindowClass::serverList); - if (windowToOpen != nullptr) - { - windowMgr->BringToFront(*windowToOpen); - } - else + if (windowMgr->BringToFrontByClass(WindowClass::serverList) == nullptr) { windowMgr->CloseByClass(WindowClass::scenarioSelect); windowMgr->CloseByClass(WindowClass::loadsave);