mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge c119444542
into 47d0996b4f
This commit is contained in:
commit
30813ef0c0
|
@ -239,6 +239,7 @@ Appreciation for contributors who have provided substantial work, but are no lon
|
|||
* Cory Ye (CoryfY)
|
||||
* Karsten Van Fossan (karstenvanf)
|
||||
* Kaavya Ramachandhran (ayvaak)
|
||||
* Tom Matalenas (tmatale)
|
||||
|
||||
## Toolchain
|
||||
* (Balletie) - macOS
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
- Fix: [#21787] Map generator heightmap should respect increased height limits.
|
||||
- Fix: [#21829] When creating a new scenario, the default name contains formatting codes.
|
||||
- Fix: [#21937] Build errors with the ORIGINAL_RATINGS flag.
|
||||
- Fix: [#21959] "Save this before...?" message does not appear when selecting "New Game".
|
||||
- Fix: [objects#324] Cannot build Colosseum inside a turn or helix.
|
||||
- Fix: [objects#325] Sloped castle walls are vertically offset by one pixel (original bug).
|
||||
|
||||
|
|
|
@ -283,8 +283,6 @@ static Widget _topToolbarWidgets[] = {
|
|||
};
|
||||
// clang-format on
|
||||
|
||||
static void ScenarioSelectCallback(const utf8* path);
|
||||
|
||||
class TopToolbar final : public Window
|
||||
{
|
||||
private:
|
||||
|
@ -2625,9 +2623,9 @@ static Widget _topToolbarWidgets[] = {
|
|||
{
|
||||
case DDIDX_NEW_GAME:
|
||||
{
|
||||
auto intent = Intent(WindowClass::ScenarioSelect);
|
||||
intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast<void*>(ScenarioSelectCallback));
|
||||
ContextOpenIntent(&intent);
|
||||
auto loadOrQuitAction = LoadOrQuitAction(
|
||||
LoadOrQuitModes::OpenSavePrompt, PromptMode::SaveBeforeNewGame);
|
||||
GameActions::Execute(&loadOrQuitAction);
|
||||
break;
|
||||
}
|
||||
case DDIDX_LOAD_GAME:
|
||||
|
@ -3251,15 +3249,6 @@ static Widget _topToolbarWidgets[] = {
|
|||
}
|
||||
};
|
||||
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue