mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 23:34:37 +01:00
Introduce context functions and intents for progress window
This commit is contained in:
@@ -269,11 +269,6 @@ public:
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
case WindowClass::ProgressWindow:
|
||||
{
|
||||
std::string message = intent->GetStringExtra(INTENT_EXTRA_MESSAGE);
|
||||
return ProgressWindowOpen(message);
|
||||
}
|
||||
case WindowClass::Ride:
|
||||
{
|
||||
const auto rideId = RideId::FromUnderlying(intent->GetSIntExtra(INTENT_EXTRA_RIDE_ID));
|
||||
@@ -340,6 +335,26 @@ public:
|
||||
return window;
|
||||
}
|
||||
|
||||
case INTENT_ACTION_PROGRESS_OPEN:
|
||||
{
|
||||
std::string message = intent->GetStringExtra(INTENT_EXTRA_MESSAGE);
|
||||
return ProgressWindowOpen(message);
|
||||
}
|
||||
|
||||
case INTENT_ACTION_PROGRESS_SET:
|
||||
{
|
||||
uint32_t currentProgress = intent->GetUIntExtra(INTENT_EXTRA_PROGRESS_OFFSET);
|
||||
uint32_t totalCount = intent->GetUIntExtra(INTENT_EXTRA_PROGRESS_TOTAL);
|
||||
ProgressWindowSet(currentProgress, totalCount);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
case INTENT_ACTION_PROGRESS_CLOSE:
|
||||
{
|
||||
ProgressWindowClose();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
case INTENT_ACTION_NULL:
|
||||
// Intent does not hold an intent action
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user