mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 14:24:33 +01:00
Close #23018: Close windows before loading new game
This commit is contained in:
committed by
GitHub
parent
1ff192b8a0
commit
f4d2dadfe7
@@ -622,7 +622,11 @@ static void GameLoadOrQuitNoSavePromptCallback(int32_t result, const utf8* path)
|
||||
|
||||
static void NewGameWindowCallback(const utf8* path)
|
||||
{
|
||||
WindowCloseByClass(WindowClass::EditorObjectSelection);
|
||||
// Closing this will cause a Ride window to pop up, so we have to do this to ensure that
|
||||
// no windows are open (besides the toolbars and LoadSave window).
|
||||
WindowCloseByClass(WindowClass::RideConstruction);
|
||||
WindowCloseAllExceptClass(WindowClass::Loadsave);
|
||||
|
||||
GameNotifyMapChange();
|
||||
GetContext()->LoadParkFromFile(path, false, true);
|
||||
GameLoadScripts();
|
||||
|
||||
Reference in New Issue
Block a user