mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 23:34:37 +01:00
Move WindowCreate and WindowFocusOrCreate into WindowManager (#23643)
* Move WindowBringToFront into WindowManager * Move WindowCreate and WindowFocusOrCreate into WindowManager * Cut back on Context/UiContext includes
This commit is contained in:
@@ -202,7 +202,7 @@ GameActions::Result RideSetStatusAction::Execute() const
|
||||
|
||||
// Fix #3183: Make sure we close the construction window so the ride finishes any editing code before opening
|
||||
// otherwise vehicles get added to the ride incorrectly (such as to a ghost station)
|
||||
auto* windowMgr = GetContext()->GetUiContext()->GetWindowManager();
|
||||
auto* windowMgr = Ui::GetWindowManager();
|
||||
WindowBase* constructionWindow = windowMgr->FindByNumber(WindowClass::RideConstruction, _rideIndex.ToUnderlying());
|
||||
if (constructionWindow != nullptr)
|
||||
{
|
||||
@@ -243,7 +243,7 @@ GameActions::Result RideSetStatusAction::Execute() const
|
||||
Guard::Assert(false, "Invalid ride status %u", _status);
|
||||
break;
|
||||
}
|
||||
auto windowManager = OpenRCT2::GetContext()->GetUiContext()->GetWindowManager();
|
||||
auto windowManager = OpenRCT2::Ui::GetWindowManager();
|
||||
windowManager->BroadcastIntent(Intent(INTENT_ACTION_REFRESH_CAMPAIGN_RIDE_LIST));
|
||||
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user