diff --git a/contributors.md b/contributors.md index f9a3468360..89c3c7f47d 100644 --- a/contributors.md +++ b/contributors.md @@ -244,6 +244,7 @@ Appreciation for contributors who have provided substantial work, but are no lon * Kaavya Ramachandhran (ayvaak) * Mike Harvey (harvito) * Robert Yan (lewyche) +* Tom Matalenas (tmatale) ## Toolchain * (Balletie) - macOS diff --git a/distribution/changelog.txt b/distribution/changelog.txt index f90df107a1..c7a3d065b2 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -1,6 +1,7 @@ 0.4.15 (in development) ------------------------------------------------------------------------ - Feature: [#15642] Track design placement can now use contruction modifier keys (ctrl/shift). +- Fix: [#21959] “Save this before...?” message does not appear when selecting “New Game”. - Fix: [#22231] Invalid object version can cause a crash. - Fix: [#22653] Add several .parkpatch files for missing water tiles in RCT1 and RCT2 scenarios. diff --git a/src/openrct2-ui/windows/TopToolbar.cpp b/src/openrct2-ui/windows/TopToolbar.cpp index 3cbc425dfc..c294c9ad66 100644 --- a/src/openrct2-ui/windows/TopToolbar.cpp +++ b/src/openrct2-ui/windows/TopToolbar.cpp @@ -267,8 +267,6 @@ namespace OpenRCT2::Ui::Windows }; // clang-format on - static void ScenarioSelectCallback(const utf8* path); - class TopToolbar final : public Window { private: @@ -447,9 +445,9 @@ namespace OpenRCT2::Ui::Windows { case DDIDX_NEW_GAME: { - auto intent = Intent(WindowClass::ScenarioSelect); - intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(ScenarioSelectCallback)); - ContextOpenIntent(&intent); + auto loadOrQuitAction = LoadOrQuitAction( + LoadOrQuitModes::OpenSavePrompt, PromptMode::SaveBeforeNewGame); + GameActions::Execute(&loadOrQuitAction); break; } case DDIDX_LOAD_GAME: @@ -991,15 +989,6 @@ namespace OpenRCT2::Ui::Windows } }; - static void ScenarioSelectCallback(const utf8* path) - { - WindowCloseByClass(WindowClass::EditorObjectSelection); - GameNotifyMapChange(); - GetContext()->LoadParkFromFile(path, false, true); - GameLoadScripts(); - GameNotifyMapChanged(); - } - /** * Creates the main game top toolbar window. * rct2: 0x0066B485 (part of 0x0066B3E8)