1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 09:14:58 +01:00

Split LOADSAVETYPE_* into LoadSaveAction and LoadSaveType

This commit is contained in:
Michael Steenbeek
2025-03-06 22:06:39 +01:00
committed by GitHub
parent 74c5718b98
commit 8266447904
20 changed files with 319 additions and 248 deletions

View File

@@ -257,13 +257,14 @@ public:
intent->GetSIntExtra(INTENT_EXTRA_RIDE_ID));
case WindowClass::Loadsave:
{
uint32_t type = intent->GetUIntExtra(INTENT_EXTRA_LOADSAVE_TYPE);
auto action = intent->GetEnumExtra<LoadSaveAction>(INTENT_EXTRA_LOADSAVE_ACTION);
auto type = intent->GetEnumExtra<LoadSaveType>(INTENT_EXTRA_LOADSAVE_TYPE);
std::string defaultPath = intent->GetStringExtra(INTENT_EXTRA_PATH);
LoadSaveCallback callback = reinterpret_cast<LoadSaveCallback>(
intent->GetCloseCallbackExtra(INTENT_EXTRA_CALLBACK));
TrackDesign* trackDesign = static_cast<TrackDesign*>(intent->GetPointerExtra(INTENT_EXTRA_TRACK_DESIGN));
auto* w = FileBrowser::OpenPreferred(
type, defaultPath,
action, type, defaultPath,
[callback](ModalResult result, std::string_view path) {
if (callback != nullptr)
{