mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-14 19:42:38 +01:00
Fix #21959: No save prompt when starting a new game
This commit is contained in:
@@ -244,6 +244,7 @@ Appreciation for contributors who have provided substantial work, but are no lon
|
|||||||
* Kaavya Ramachandhran (ayvaak)
|
* Kaavya Ramachandhran (ayvaak)
|
||||||
* Mike Harvey (harvito)
|
* Mike Harvey (harvito)
|
||||||
* Robert Yan (lewyche)
|
* Robert Yan (lewyche)
|
||||||
|
* Tom Matalenas (tmatale)
|
||||||
|
|
||||||
## Toolchain
|
## Toolchain
|
||||||
* (Balletie) - macOS
|
* (Balletie) - macOS
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
0.4.15 (in development)
|
0.4.15 (in development)
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
- Feature: [#15642] Track design placement can now use contruction modifier keys (ctrl/shift).
|
- 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: [#22231] Invalid object version can cause a crash.
|
||||||
- Fix: [#22653] Add several .parkpatch files for missing water tiles in RCT1 and RCT2 scenarios.
|
- Fix: [#22653] Add several .parkpatch files for missing water tiles in RCT1 and RCT2 scenarios.
|
||||||
|
|
||||||
|
|||||||
@@ -267,8 +267,6 @@ namespace OpenRCT2::Ui::Windows
|
|||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
static void ScenarioSelectCallback(const utf8* path);
|
|
||||||
|
|
||||||
class TopToolbar final : public Window
|
class TopToolbar final : public Window
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
@@ -447,9 +445,9 @@ namespace OpenRCT2::Ui::Windows
|
|||||||
{
|
{
|
||||||
case DDIDX_NEW_GAME:
|
case DDIDX_NEW_GAME:
|
||||||
{
|
{
|
||||||
auto intent = Intent(WindowClass::ScenarioSelect);
|
auto loadOrQuitAction = LoadOrQuitAction(
|
||||||
intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast<void*>(ScenarioSelectCallback));
|
LoadOrQuitModes::OpenSavePrompt, PromptMode::SaveBeforeNewGame);
|
||||||
ContextOpenIntent(&intent);
|
GameActions::Execute(&loadOrQuitAction);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DDIDX_LOAD_GAME:
|
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.
|
* Creates the main game top toolbar window.
|
||||||
* rct2: 0x0066B485 (part of 0x0066B3E8)
|
* rct2: 0x0066B485 (part of 0x0066B3E8)
|
||||||
|
|||||||
Reference in New Issue
Block a user