diff --git a/src/openrct2-ui/ProvisionalElements.cpp b/src/openrct2-ui/ProvisionalElements.cpp index d5520d0d8c..e8a2508a62 100644 --- a/src/openrct2-ui/ProvisionalElements.cpp +++ b/src/openrct2-ui/ProvisionalElements.cpp @@ -30,14 +30,14 @@ namespace OpenRCT2::Ui FootpathRemoveProvisionalTemporarily(); auto* windowMgr = GetWindowManager(); - if (windowMgr->FindByClass(WindowClass::RideConstruction) != nullptr) + if (windowMgr->FindByClass(WindowClass::rideConstruction) != nullptr) { RideRemoveProvisionalTrackPiece(); RideEntranceExitRemoveGhost(); } // This is in non performant so only make network games suffer for it // non networked games do not need this as its to prevent desyncs. - if ((Network::GetMode() != Network::Mode::none) && windowMgr->FindByClass(WindowClass::TrackDesignPlace) != nullptr) + if ((Network::GetMode() != Network::Mode::none) && windowMgr->FindByClass(WindowClass::trackDesignPlace) != nullptr) { TrackPlaceClearProvisionalTemporarily(); } @@ -50,14 +50,14 @@ namespace OpenRCT2::Ui FootpathRestoreProvisional(); auto* windowMgr = GetWindowManager(); - if (windowMgr->FindByClass(WindowClass::RideConstruction) != nullptr) + if (windowMgr->FindByClass(WindowClass::rideConstruction) != nullptr) { RideRestoreProvisionalTrackPiece(); RideEntranceExitPlaceProvisionalGhost(); } // This is in non performant so only make network games suffer for it // non networked games do not need this as its to prevent desyncs. - if ((Network::GetMode() != Network::Mode::none) && windowMgr->FindByClass(WindowClass::TrackDesignPlace) != nullptr) + if ((Network::GetMode() != Network::Mode::none) && windowMgr->FindByClass(WindowClass::trackDesignPlace) != nullptr) { TrackPlaceRestoreProvisional(); } diff --git a/src/openrct2-ui/UiContext.cpp b/src/openrct2-ui/UiContext.cpp index fee429ca30..4bce4325bb 100644 --- a/src/openrct2-ui/UiContext.cpp +++ b/src/openrct2-ui/UiContext.cpp @@ -154,7 +154,7 @@ public: void Draw(RenderTarget& rt) override { - auto bgColour = ThemeGetColour(WindowClass::Chat, 0); + auto bgColour = ThemeGetColour(WindowClass::chat, 0); ChatDraw(rt, bgColour); _inGameConsole.Draw(rt); } diff --git a/src/openrct2-ui/WindowManager.cpp b/src/openrct2-ui/WindowManager.cpp index 35d3a4f203..9ba4e42fa4 100644 --- a/src/openrct2-ui/WindowManager.cpp +++ b/src/openrct2-ui/WindowManager.cpp @@ -65,101 +65,101 @@ public: { switch (wc) { - case WindowClass::About: + case WindowClass::about: return AboutOpen(); - case WindowClass::BottomToolbar: + case WindowClass::bottomToolbar: return GameBottomToolbarOpen(); - case WindowClass::Changelog: + case WindowClass::changelog: return OpenView(WV_CHANGELOG); - case WindowClass::Cheats: + case WindowClass::cheats: return CheatsOpen(); - case WindowClass::ClearScenery: + case WindowClass::clearScenery: return ClearSceneryOpen(); - case WindowClass::CustomCurrencyConfig: + case WindowClass::customCurrencyConfig: return CustomCurrencyOpen(); - case WindowClass::DebugPaint: + case WindowClass::debugPaint: return DebugPaintOpen(); - case WindowClass::EditorInventionList: + case WindowClass::editorInventionList: return EditorInventionsListOpen(); - case WindowClass::EditorObjectSelection: + case WindowClass::editorObjectSelection: return EditorObjectSelectionOpen(); - case WindowClass::EditorScenarioOptions: + case WindowClass::editorScenarioOptions: return EditorScenarioOptionsOpen(); - case WindowClass::Finances: + case WindowClass::finances: return FinancesOpen(); - case WindowClass::Footpath: + case WindowClass::footpath: return FootpathOpen(); - case WindowClass::GuestList: + case WindowClass::guestList: return GuestListOpen(); - case WindowClass::Land: + case WindowClass::land: return LandOpen(); - case WindowClass::LandRights: + case WindowClass::landRights: return LandRightsOpen(); - case WindowClass::MainWindow: + case WindowClass::mainWindow: return MainOpen(); - case WindowClass::Map: + case WindowClass::map: return MapOpen(); - case WindowClass::Mapgen: + case WindowClass::mapgen: return MapgenOpen(); - case WindowClass::Multiplayer: + case WindowClass::multiplayer: return MultiplayerOpen(); - case WindowClass::ConstructRide: + case WindowClass::constructRide: return NewRideOpen(); - case WindowClass::ParkInformation: + case WindowClass::parkInformation: return ParkEntranceOpen(); - case WindowClass::RecentNews: + case WindowClass::recentNews: return NewsOpen(); - case WindowClass::RideConstruction: + case WindowClass::rideConstruction: return RideConstructionOpen(); - case WindowClass::Research: + case WindowClass::research: return ResearchOpen(); - case WindowClass::RideList: + case WindowClass::rideList: return RideListOpen(); - case WindowClass::Options: + case WindowClass::options: return OptionsOpen(); - case WindowClass::SavePrompt: + case WindowClass::savePrompt: return SavePromptOpen(); - case WindowClass::Scenery: + case WindowClass::scenery: return SceneryOpen(); - case WindowClass::SceneryScatter: + case WindowClass::sceneryScatter: return SceneryScatterOpen(); #ifndef DISABLE_NETWORK - case WindowClass::ServerList: + case WindowClass::serverList: return ServerListOpen(); - case WindowClass::ServerStart: + case WindowClass::serverStart: return ServerStartOpen(); #endif - case WindowClass::KeyboardShortcutList: + case WindowClass::keyboardShortcutList: return ShortcutKeysOpen(); - case WindowClass::StaffList: + case WindowClass::staffList: return StaffListOpen(); - case WindowClass::Themes: + case WindowClass::themes: return ThemesOpen(); - case WindowClass::TileInspector: + case WindowClass::tileInspector: return TileInspectorOpen(); - case WindowClass::TitleExit: + case WindowClass::titleExit: return TitleExitOpen(); - case WindowClass::TitleLogo: + case WindowClass::titleLogo: return TitleLogoOpen(); - case WindowClass::TitleMenu: + case WindowClass::titleMenu: return TitleMenuOpen(); - case WindowClass::TitleOptions: + case WindowClass::titleOptions: return TitleOptionsOpen(); - case WindowClass::TitleVersion: + case WindowClass::titleVersion: return TitleVersionOpen(); - case WindowClass::TopToolbar: + case WindowClass::topToolbar: return TopToolbarOpen(); - case WindowClass::ViewClipping: + case WindowClass::viewClipping: return ViewClippingOpen(); - case WindowClass::Viewport: + case WindowClass::viewport: return ViewportOpen(); - case WindowClass::Water: + case WindowClass::water: return WaterOpen(); - case WindowClass::Transparency: + case WindowClass::transparency: return TransparencyOpen(); - case WindowClass::AssetPacks: + case WindowClass::assetPacks: return AssetPacksOpen(); - case WindowClass::EditorParkEntrance: + case WindowClass::editorParkEntrance: return EditorParkEntranceOpen(); default: Console::Error::WriteLine("Unhandled window class (%d)", wc); @@ -184,7 +184,7 @@ public: case WV_RIDE_RESEARCH: if (Config::Get().interface.ToolbarShowResearch) { - return this->OpenWindow(WindowClass::Research); + return this->OpenWindow(WindowClass::research); } return NewRideOpenResearch(); case WV_MAZE_CONSTRUCTION: @@ -244,17 +244,17 @@ public: { switch (intent->GetWindowClass()) { - case WindowClass::Peep: + case WindowClass::peep: return GuestOpen(static_cast(intent->GetPointerExtra(INTENT_EXTRA_PEEP))); - case WindowClass::FirePrompt: + case WindowClass::firePrompt: return StaffFirePromptOpen(static_cast(intent->GetPointerExtra(INTENT_EXTRA_PEEP))); - case WindowClass::InstallTrack: + case WindowClass::installTrack: return InstallTrackOpen(intent->GetStringExtra(INTENT_EXTRA_PATH).c_str()); - case WindowClass::GuestList: + case WindowClass::guestList: return GuestListOpenWithFilter( static_cast(intent->GetSIntExtra(INTENT_EXTRA_GUEST_LIST_FILTER)), intent->GetSIntExtra(INTENT_EXTRA_RIDE_ID)); - case WindowClass::Loadsave: + case WindowClass::loadsave: { auto action = intent->GetEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION); auto type = intent->GetEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE); @@ -273,15 +273,15 @@ public: trackDesign); return w; } - case WindowClass::ManageTrackDesign: + case WindowClass::manageTrackDesign: return TrackManageOpen(static_cast(intent->GetPointerExtra(INTENT_EXTRA_TRACK_DESIGN))); - case WindowClass::NetworkStatus: + case WindowClass::networkStatus: { std::string message = intent->GetStringExtra(INTENT_EXTRA_MESSAGE); CloseCallback callback = intent->GetCloseCallbackExtra(INTENT_EXTRA_CALLBACK); return NetworkStatusOpen(message, callback); } - case WindowClass::ObjectLoadError: + case WindowClass::objectLoadError: { std::string path = intent->GetStringExtra(INTENT_EXTRA_PATH); auto objects = static_cast(intent->GetPointerExtra(INTENT_EXTRA_LIST)); @@ -290,26 +290,26 @@ public: return nullptr; } - case WindowClass::Ride: + case WindowClass::ride: { const auto rideId = RideId::FromUnderlying(intent->GetSIntExtra(INTENT_EXTRA_RIDE_ID)); auto ride = GetRide(rideId); return ride == nullptr ? nullptr : RideMainOpen(*ride); } - case WindowClass::TrackDesignPlace: + case WindowClass::trackDesignPlace: return TrackPlaceOpen(static_cast(intent->GetPointerExtra(INTENT_EXTRA_TRACK_DESIGN))); - case WindowClass::TrackDesignList: + case WindowClass::trackDesignList: { RideSelection rideItem; rideItem.Type = intent->GetUIntExtra(INTENT_EXTRA_RIDE_TYPE); rideItem.EntryIndex = intent->GetUIntExtra(INTENT_EXTRA_RIDE_ENTRY_INDEX); return TrackListOpen(rideItem); } - case WindowClass::ScenarioSelect: + case WindowClass::scenarioSelect: return ScenarioselectOpen( reinterpret_cast(intent->GetCloseCallbackExtra(INTENT_EXTRA_CALLBACK))); - case WindowClass::Null: + case WindowClass::null: // Intent does not hold a window class break; @@ -336,7 +336,7 @@ public: case INTENT_ACTION_NEW_SCENERY: { // Check if window is already open - auto* window = BringToFrontByClass(WindowClass::Scenery); + auto* window = BringToFrontByClass(WindowClass::scenery); if (window == nullptr) ToggleSceneryWindow(); @@ -416,7 +416,7 @@ public: case INTENT_ACTION_REFRESH_RIDE_LIST: { - auto window = FindByClass(WindowClass::RideList); + auto window = FindByClass(WindowClass::rideList); if (window != nullptr) { WindowRideListRefreshList(window); @@ -432,12 +432,12 @@ public: case INTENT_ACTION_RIDE_CONSTRUCTION_FOCUS: { auto rideIndex = intent.GetUIntExtra(INTENT_EXTRA_RIDE_ID); - auto w = FindByClass(WindowClass::RideConstruction); + auto w = FindByClass(WindowClass::rideConstruction); if (w == nullptr || w->number != static_cast(rideIndex)) { CloseConstructionWindows(); _currentRideIndex = RideId::FromUnderlying(rideIndex); - OpenWindow(WindowClass::RideConstruction); + OpenWindow(WindowClass::rideConstruction); } else { @@ -504,19 +504,19 @@ public: case INTENT_ACTION_UPDATE_CLIMATE: gToolbarDirtyFlags |= BTM_TB_DIRTY_FLAG_CLIMATE; - InvalidateByClass(WindowClass::GuestList); + InvalidateByClass(WindowClass::guestList); break; case INTENT_ACTION_UPDATE_GUEST_COUNT: gToolbarDirtyFlags |= BTM_TB_DIRTY_FLAG_PEEP_COUNT; - InvalidateByClass(WindowClass::GuestList); - InvalidateByClass(WindowClass::ParkInformation); + InvalidateByClass(WindowClass::guestList); + InvalidateByClass(WindowClass::parkInformation); WindowGuestListRefreshList(); break; case INTENT_ACTION_UPDATE_PARK_RATING: gToolbarDirtyFlags |= BTM_TB_DIRTY_FLAG_PARK_RATING; - InvalidateByClass(WindowClass::ParkInformation); + InvalidateByClass(WindowClass::parkInformation); break; case INTENT_ACTION_UPDATE_DATE: @@ -524,7 +524,7 @@ public: break; case INTENT_ACTION_UPDATE_CASH: - InvalidateByClass(WindowClass::Finances); + InvalidateByClass(WindowClass::finances); gToolbarDirtyFlags |= BTM_TB_DIRTY_FLAG_MONEY; break; @@ -532,7 +532,7 @@ public: { WindowNumber bannerIndex = static_cast(intent.GetUIntExtra(INTENT_EXTRA_BANNER_INDEX)); - WindowBase* w = FindByNumber(WindowClass::Banner, bannerIndex); + WindowBase* w = FindByNumber(WindowClass::banner, bannerIndex); if (w != nullptr) { w->invalidate(); @@ -540,8 +540,8 @@ public: break; } case INTENT_ACTION_UPDATE_RESEARCH: - InvalidateByClass(WindowClass::Finances); - InvalidateByClass(WindowClass::Research); + InvalidateByClass(WindowClass::finances); + InvalidateByClass(WindowClass::research); break; case INTENT_ACTION_UPDATE_VEHICLE_SOUNDS: @@ -560,7 +560,7 @@ public: case INTENT_ACTION_TILE_MODIFY: { - InvalidateByClass(WindowClass::TileInspector); + InvalidateByClass(WindowClass::tileInspector); break; } @@ -585,15 +585,15 @@ public: { switch (windowClass) { - case WindowClass::EditorObjectSelection: + case WindowClass::editorObjectSelection: EditorObjectSelectionClose(); break; - case WindowClass::NetworkStatus: + case WindowClass::networkStatus: WindowNetworkStatusClose(); break; - case WindowClass::ProgressWindow: + case WindowClass::progressWindow: ProgressWindowClose(); break; @@ -971,7 +971,7 @@ public: } } // skip window if window matches specified WindowClass (as user may be modifying via options) - if (avoid_classification != WindowClass::Null && foundW != nullptr + if (avoid_classification != WindowClass::null && foundW != nullptr && foundW->classification == avoid_classification) { continue; @@ -1045,7 +1045,7 @@ public: */ void CloseTop() override { - CloseByClass(WindowClass::Dropdown); + CloseByClass(WindowClass::dropdown); if (gLegacyScene == LegacyScene::scenarioEditor) { @@ -1064,13 +1064,13 @@ public: */ void CloseAll() override { - CloseByClass(WindowClass::Dropdown); + CloseByClass(WindowClass::dropdown); CloseByCondition([](WindowBase* w) -> bool { return !(w->flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT)); }); } void CloseAllExceptClass(WindowClass cls) override { - CloseByClass(WindowClass::Dropdown); + CloseByClass(WindowClass::dropdown); CloseByCondition([cls](WindowBase* w) -> bool { return w->classification != cls && !(w->flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT)); }); @@ -1089,7 +1089,7 @@ public: */ void CloseAllExceptNumberAndClass(WindowNumber number, WindowClass cls) override { - CloseByClass(WindowClass::Dropdown); + CloseByClass(WindowClass::dropdown); CloseByCondition([cls, number](WindowBase* w) -> bool { return (!(w->number == number && w->classification == cls) && !(w->flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT))); }); @@ -1101,10 +1101,10 @@ public: */ void CloseConstructionWindows() override { - CloseByClass(WindowClass::RideConstruction); - CloseByClass(WindowClass::Footpath); - CloseByClass(WindowClass::TrackDesignList); - CloseByClass(WindowClass::TrackDesignPlace); + CloseByClass(WindowClass::rideConstruction); + CloseByClass(WindowClass::footpath); + CloseByClass(WindowClass::trackDesignList); + CloseByClass(WindowClass::trackDesignPlace); } /** diff --git a/src/openrct2-ui/input/InputManager.cpp b/src/openrct2-ui/input/InputManager.cpp index 1cd37b3a64..f7b6168dff 100644 --- a/src/openrct2-ui/input/InputManager.cpp +++ b/src/openrct2-ui/input/InputManager.cpp @@ -243,7 +243,7 @@ void InputManager::HandleViewScrolling() { // Only unfollow sprites for the main window or viewport windows // Don't unfollow for ride windows that might be following vehicles - if (targetWindow == mainWindow || targetWindow->classification == WindowClass::Viewport) + if (targetWindow == mainWindow || targetWindow->classification == WindowClass::viewport) { WindowUnfollowSprite(*targetWindow); } @@ -349,7 +349,7 @@ void InputManager::Process(const InputEvent& e) auto* windowMgr = GetWindowManager(); // TODO: replace with event - auto w = windowMgr->FindByClass(WindowClass::Textinput); + auto w = windowMgr->FindByClass(WindowClass::textinput); if (w != nullptr) { if (e.State == InputEventState::Release) @@ -360,7 +360,7 @@ void InputManager::Process(const InputEvent& e) } // TODO: replace with event - w = windowMgr->FindByClass(WindowClass::LoadsaveOverwritePrompt); + w = windowMgr->FindByClass(WindowClass::loadsaveOverwritePrompt); if (w != nullptr) { if (e.State == InputEventState::Release) @@ -371,7 +371,7 @@ void InputManager::Process(const InputEvent& e) } // TODO: replace with event - w = windowMgr->FindByClass(WindowClass::Loadsave); + w = windowMgr->FindByClass(WindowClass::loadsave); if (w != nullptr) { if (e.State == InputEventState::Release) @@ -576,7 +576,7 @@ bool InputManager::HasTextInputFocus() const return true; auto* windowMgr = GetWindowManager(); - auto w = windowMgr->FindByClass(WindowClass::Textinput); + auto w = windowMgr->FindByClass(WindowClass::textinput); if (w != nullptr) return true; diff --git a/src/openrct2-ui/input/MouseInput.cpp b/src/openrct2-ui/input/MouseInput.cpp index b329bad495..2a5a67015f 100644 --- a/src/openrct2-ui/input/MouseInput.cpp +++ b/src/openrct2-ui/input/MouseInput.cpp @@ -308,7 +308,7 @@ namespace OpenRCT2 InputWidgetLeft(screenCoords, w, widgetIndex); break; case MouseState::RightPress: - windowMgr->CloseByClass(WindowClass::Tooltip); + windowMgr->CloseByClass(WindowClass::tooltip); if (w != nullptr) { @@ -555,7 +555,7 @@ namespace OpenRCT2 // Only unfollow sprites for the main window or ‘extra viewport’ windows. // Don’t unfollow for windows where the viewport is always supposed to follow (e.g. Ride, Guest, Staff). auto mainWindow = WindowGetMain(); - if (&w == mainWindow || w.classification == WindowClass::Viewport) + if (&w == mainWindow || w.classification == WindowClass::viewport) { WindowUnfollowSprite(w); } @@ -961,7 +961,7 @@ namespace OpenRCT2 */ static void InputWidgetOver(const ScreenCoordsXY& screenCoords, WindowBase* w, WidgetIndex widgetIndex) { - WindowClass windowClass = WindowClass::Null; + WindowClass windowClass = WindowClass::null; WindowNumber windowNumber = 0; Widget* widget = nullptr; @@ -1012,7 +1012,7 @@ namespace OpenRCT2 gHoverWidget.widgetIndex = widgetIndex; // Invalidate new widget cursor is on if widget is a flat button - if (windowClass != WindowClass::Null) + if (windowClass != WindowClass::null) InputWidgetOverFlatbuttonInvalidate(); } } @@ -1042,7 +1042,7 @@ namespace OpenRCT2 */ static void InputWidgetLeft(const ScreenCoordsXY& screenCoords, WindowBase* w, WidgetIndex widgetIndex) { - WindowClass windowClass = WindowClass::Null; + WindowClass windowClass = WindowClass::null; WindowNumber windowNumber = 0; if (w != nullptr) @@ -1052,8 +1052,8 @@ namespace OpenRCT2 } auto* windowMgr = GetWindowManager(); - windowMgr->CloseByClass(WindowClass::Error); - windowMgr->CloseByClass(WindowClass::Tooltip); + windowMgr->CloseByClass(WindowClass::error); + windowMgr->CloseByClass(WindowClass::tooltip); // Window might have changed position in the list, therefore find it again w = windowMgr->FindByNumber(windowClass, windowNumber); @@ -1320,7 +1320,7 @@ namespace OpenRCT2 if (_inputState == InputState::DropdownActive) { gDropdown.highlightedIndex = gDropdown.defaultIndex; - windowMgr->InvalidateByClass(WindowClass::Dropdown); + windowMgr->InvalidateByClass(WindowClass::dropdown); } return; } @@ -1339,7 +1339,7 @@ namespace OpenRCT2 int32_t dropdown_index = 0; bool dropdownCleanup = false; - if (w->classification == WindowClass::Dropdown) + if (w->classification == WindowClass::dropdown) { dropdown_index = DropdownIndexFromPoint(screenCoords, w); dropdownCleanup = dropdown_index == -1 @@ -1368,7 +1368,7 @@ namespace OpenRCT2 } } - windowMgr->CloseByClass(WindowClass::Dropdown); + windowMgr->CloseByClass(WindowClass::dropdown); if (dropdownCleanup) { @@ -1454,13 +1454,13 @@ namespace OpenRCT2 } gDropdown.highlightedIndex = -1; - windowMgr->InvalidateByClass(WindowClass::Dropdown); + windowMgr->InvalidateByClass(WindowClass::dropdown); if (w == nullptr) { return; } - if (w->classification == WindowClass::Dropdown) + if (w->classification == WindowClass::dropdown) { int32_t dropdown_index = DropdownIndexFromPoint(screenCoords, w); if (dropdown_index == -1) @@ -1487,7 +1487,7 @@ namespace OpenRCT2 } gDropdown.highlightedIndex = dropdown_index; - windowMgr->InvalidateByClass(WindowClass::Dropdown); + windowMgr->InvalidateByClass(WindowClass::dropdown); } else { @@ -1498,7 +1498,7 @@ namespace OpenRCT2 static void InputUpdateTooltip(WindowBase* w, WidgetIndex widgetIndex, const ScreenCoordsXY& screenCoords) { - if (gTooltipWidget.windowClassification == WindowClass::Null) + if (gTooltipWidget.windowClassification == WindowClass::null) { if (gTooltipCursor == screenCoords) { @@ -1532,7 +1532,7 @@ namespace OpenRCT2 if (gCurrentRealTimeTicks >= gTooltipCloseTimeout) { auto* windowMgr = GetWindowManager(); - windowMgr->CloseByClass(WindowClass::Tooltip); + windowMgr->CloseByClass(WindowClass::tooltip); } } } diff --git a/src/openrct2-ui/input/ShortcutManager.cpp b/src/openrct2-ui/input/ShortcutManager.cpp index 7777f8f8ef..7c28c2eb95 100644 --- a/src/openrct2-ui/input/ShortcutManager.cpp +++ b/src/openrct2-ui/input/ShortcutManager.cpp @@ -177,7 +177,7 @@ void ShortcutManager::ProcessEvent(const InputEvent& e) _pendingShortcutChange.clear(); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::ChangeKeyboardShortcut); + windowMgr->CloseByClass(WindowClass::changeKeyboardShortcut); SaveUserBindings(); } } diff --git a/src/openrct2-ui/input/Shortcuts.cpp b/src/openrct2-ui/input/Shortcuts.cpp index 73a1564cd4..213d7dd22c 100644 --- a/src/openrct2-ui/input/Shortcuts.cpp +++ b/src/openrct2-ui/input/Shortcuts.cpp @@ -90,7 +90,7 @@ static void ShortcutRotateConstructionObject() auto* windowMgr = GetWindowManager(); // Rotate scenery - WindowBase* w = windowMgr->FindByClass(WindowClass::Scenery); + WindowBase* w = windowMgr->FindByClass(WindowClass::scenery); if (w != nullptr && !widgetIsDisabled(*w, WC_SCENERY__WIDX_SCENERY_ROTATE_OBJECTS_BUTTON) && w->widgets[WC_SCENERY__WIDX_SCENERY_ROTATE_OBJECTS_BUTTON].type != WidgetType::empty) { @@ -99,7 +99,7 @@ static void ShortcutRotateConstructionObject() } // Rotate construction track piece - w = windowMgr->FindByClass(WindowClass::RideConstruction); + w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w != nullptr && !widgetIsDisabled(*w, WC_RIDE_CONSTRUCTION__WIDX_ROTATE) && w->widgets[WC_RIDE_CONSTRUCTION__WIDX_ROTATE].type != WidgetType::empty) { @@ -112,7 +112,7 @@ static void ShortcutRotateConstructionObject() } // Rotate track design preview - w = windowMgr->FindByClass(WindowClass::TrackDesignList); + w = windowMgr->FindByClass(WindowClass::trackDesignList); if (w != nullptr && !widgetIsDisabled(*w, WC_TRACK_DESIGN_LIST__WIDX_ROTATE) && w->widgets[WC_TRACK_DESIGN_LIST__WIDX_ROTATE].type != WidgetType::empty) { @@ -121,7 +121,7 @@ static void ShortcutRotateConstructionObject() } // Rotate track design placement - w = windowMgr->FindByClass(WindowClass::TrackDesignPlace); + w = windowMgr->FindByClass(WindowClass::trackDesignPlace); if (w != nullptr && !widgetIsDisabled(*w, WC_TRACK_DESIGN_PLACE__WIDX_ROTATE) && w->widgets[WC_TRACK_DESIGN_PLACE__WIDX_ROTATE].type != WidgetType::empty) { @@ -130,7 +130,7 @@ static void ShortcutRotateConstructionObject() } // Rotate park entrance - w = windowMgr->FindByClass(WindowClass::EditorParkEntrance); + w = windowMgr->FindByClass(WindowClass::editorParkEntrance); if (w != nullptr && !widgetIsDisabled(*w, WC_EDITOR_PARK_ENTRANCE__WIDX_ROTATE_ENTRANCE_BUTTON) && w->widgets[WC_EDITOR_PARK_ENTRANCE__WIDX_ROTATE_ENTRANCE_BUTTON].type != WidgetType::empty) { @@ -139,7 +139,7 @@ static void ShortcutRotateConstructionObject() } // Rotate selected element in tile inspector - w = windowMgr->FindByClass(WindowClass::TileInspector); + w = windowMgr->FindByClass(WindowClass::tileInspector); if (w != nullptr && !widgetIsDisabled(*w, WC_TILE_INSPECTOR__WIDX_BUTTON_ROTATE) && w->widgets[WC_TILE_INSPECTOR__WIDX_BUTTON_ROTATE].type != WidgetType::empty) { @@ -154,13 +154,13 @@ static void ShortcutRemoveTopBottomToolbarToggle() if (gLegacyScene == LegacyScene::titleSequence) { - if (windowMgr->FindByClass(WindowClass::TitleLogo) != nullptr) + if (windowMgr->FindByClass(WindowClass::titleLogo) != nullptr) { - windowMgr->CloseByClass(WindowClass::TitleLogo); - windowMgr->CloseByClass(WindowClass::TitleOptions); - windowMgr->CloseByClass(WindowClass::TitleMenu); - windowMgr->CloseByClass(WindowClass::TitleExit); - windowMgr->CloseByClass(WindowClass::TitleVersion); + windowMgr->CloseByClass(WindowClass::titleLogo); + windowMgr->CloseByClass(WindowClass::titleOptions); + windowMgr->CloseByClass(WindowClass::titleMenu); + windowMgr->CloseByClass(WindowClass::titleExit); + windowMgr->CloseByClass(WindowClass::titleVersion); } else { @@ -169,22 +169,22 @@ static void ShortcutRemoveTopBottomToolbarToggle() } else { - if (windowMgr->FindByClass(WindowClass::TopToolbar) != nullptr) + if (windowMgr->FindByClass(WindowClass::topToolbar) != nullptr) { - windowMgr->CloseByClass(WindowClass::Dropdown); - windowMgr->CloseByClass(WindowClass::TopToolbar); - windowMgr->CloseByClass(WindowClass::BottomToolbar); + windowMgr->CloseByClass(WindowClass::dropdown); + windowMgr->CloseByClass(WindowClass::topToolbar); + windowMgr->CloseByClass(WindowClass::bottomToolbar); } else { if (gLegacyScene == LegacyScene::playing) { - ContextOpenWindow(WindowClass::TopToolbar); - ContextOpenWindow(WindowClass::BottomToolbar); + ContextOpenWindow(WindowClass::topToolbar); + ContextOpenWindow(WindowClass::bottomToolbar); } else { - ContextOpenWindow(WindowClass::TopToolbar); + ContextOpenWindow(WindowClass::topToolbar); ContextOpenWindowView(WV_EDITOR_BOTTOM_TOOLBAR); } } @@ -257,7 +257,7 @@ static void ShortcutBuildNewRide() { if (!(isInTrackDesignerOrManager())) { - ContextOpenWindow(WindowClass::ConstructRide); + ContextOpenWindow(WindowClass::constructRide); } } } @@ -269,7 +269,7 @@ static void ShortcutShowFinancialInformation() if (!(isInTrackDesignerOrManager())) if (!(getGameState().park.flags & PARK_FLAGS_NO_MONEY)) - ContextOpenWindow(WindowClass::Finances); + ContextOpenWindow(WindowClass::finances); } static void ShortcutShowResearchInformation() @@ -290,7 +290,7 @@ static void ShortcutShowRidesList() if (!isInEditorMode()) { - ContextOpenWindow(WindowClass::RideList); + ContextOpenWindow(WindowClass::rideList); } } @@ -301,7 +301,7 @@ static void ShortcutShowParkInformation() if (!isInEditorMode()) { - ContextOpenWindow(WindowClass::ParkInformation); + ContextOpenWindow(WindowClass::parkInformation); } } @@ -312,7 +312,7 @@ static void ShortcutShowGuestList() if (!isInEditorMode()) { - ContextOpenWindow(WindowClass::GuestList); + ContextOpenWindow(WindowClass::guestList); } } @@ -323,7 +323,7 @@ static void ShortcutShowStaffList() if (!isInEditorMode()) { - ContextOpenWindow(WindowClass::StaffList); + ContextOpenWindow(WindowClass::staffList); } } @@ -333,7 +333,7 @@ static void ShortcutShowRecentMessages() return; if (!isInEditorMode()) - ContextOpenWindow(WindowClass::RecentNews); + ContextOpenWindow(WindowClass::recentNews); } static void ShortcutShowMap() @@ -343,7 +343,7 @@ static void ShortcutShowMap() if (gLegacyScene != LegacyScene::scenarioEditor || getGameState().editorStep == EditorStep::LandscapeEditor) if (!(isInTrackDesignerOrManager())) - ContextOpenWindow(WindowClass::Map); + ContextOpenWindow(WindowClass::map); } static void ShortcutReduceGameSpeed() @@ -371,13 +371,13 @@ static void ShortcutOpenCheatWindow() // Check if window is already open auto* windowMgr = GetWindowManager(); - WindowBase* window = windowMgr->FindByClass(WindowClass::Cheats); + WindowBase* window = windowMgr->FindByClass(WindowClass::cheats); if (window != nullptr) { windowMgr->Close(*window); return; } - ContextOpenWindow(WindowClass::Cheats); + ContextOpenWindow(WindowClass::cheats); } static void ShortcutOpenKeyboardShortcutsWindow() @@ -390,7 +390,7 @@ static void ShortcutOpenTransparencyWindow() if (gLegacyScene != LegacyScene::playing) return; - ContextOpenWindow(WindowClass::Transparency); + ContextOpenWindow(WindowClass::transparency); } static void ShortcutClearScenery() @@ -417,7 +417,7 @@ static void ShortcutQuickSaveGame() } else if (gLegacyScene == LegacyScene::scenarioEditor) { - auto intent = Intent(WindowClass::Loadsave); + auto intent = Intent(WindowClass::loadsave); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::save); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::landscape); intent.PutExtra(INTENT_EXTRA_PATH, getGameState().scenarioOptions.name); @@ -442,11 +442,11 @@ static void ShortcutOpenSceneryPicker() return; auto* windowMgr = GetWindowManager(); - WindowBase* sceneryWindow = windowMgr->FindByClass(WindowClass::Scenery); + WindowBase* sceneryWindow = windowMgr->FindByClass(WindowClass::scenery); if (sceneryWindow == nullptr) ToggleSceneryWindow(); - sceneryWindow = windowMgr->FindByClass(WindowClass::Scenery); + sceneryWindow = windowMgr->FindByClass(WindowClass::scenery); if (sceneryWindow != nullptr && !widgetIsDisabled(*sceneryWindow, WC_SCENERY__WIDX_SCENERY_EYEDROPPER_BUTTON) && !gWindowSceneryEyedropperEnabled) { @@ -478,7 +478,7 @@ static void ShortcutScaleDown() static void TileInspectorMouseUp(WidgetIndex widgetIndex) { auto* windowMgr = GetWindowManager(); - auto w = windowMgr->FindByClass(WindowClass::TileInspector); + auto w = windowMgr->FindByClass(WindowClass::tileInspector); if (w != nullptr && !widgetIsDisabled(*w, widgetIndex) && w->widgets[widgetIndex].type != WidgetType::empty) { w->onMouseUp(widgetIndex); @@ -488,7 +488,7 @@ static void TileInspectorMouseUp(WidgetIndex widgetIndex) static void TileInspectorMouseDown(WidgetIndex widgetIndex) { auto* windowMgr = GetWindowManager(); - auto w = windowMgr->FindByClass(WindowClass::TileInspector); + auto w = windowMgr->FindByClass(WindowClass::tileInspector); if (w != nullptr && !widgetIsDisabled(*w, widgetIndex) && w->widgets[widgetIndex].type != WidgetType::empty) { w->onMouseDown(widgetIndex); @@ -498,7 +498,7 @@ static void TileInspectorMouseDown(WidgetIndex widgetIndex) static void ShortcutToggleWallSlope() { auto* windowMgr = GetWindowManager(); - WindowBase* window = windowMgr->FindByClass(WindowClass::TileInspector); + WindowBase* window = windowMgr->FindByClass(WindowClass::tileInspector); if (window == nullptr) { return; @@ -531,7 +531,7 @@ static void ShortcutToggleWallSlope() static void ShortcutIncreaseElementHeight() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::TileInspector); + WindowBase* w = windowMgr->FindByClass(WindowClass::tileInspector); if (w != nullptr) { int action = -1; @@ -571,7 +571,7 @@ static void ShortcutIncreaseElementHeight() static void ShortcutDecreaseElementHeight() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::TileInspector); + WindowBase* w = windowMgr->FindByClass(WindowClass::tileInspector); if (w != nullptr) { int action = -1; @@ -636,7 +636,7 @@ static void ShortcutConstructionTurnLeft() return; auto* windowMgr = GetWindowManager(); - WindowBase* window = windowMgr->FindByClass(WindowClass::Footpath); + WindowBase* window = windowMgr->FindByClass(WindowClass::footpath); if (window != nullptr) { WindowFootpathKeyboardShortcutTurnLeft(); @@ -653,7 +653,7 @@ static void ShortcutConstructionTurnRight() return; auto* windowMgr = GetWindowManager(); - WindowBase* window = windowMgr->FindByClass(WindowClass::Footpath); + WindowBase* window = windowMgr->FindByClass(WindowClass::footpath); if (window != nullptr) { WindowFootpathKeyboardShortcutTurnRight(); @@ -670,7 +670,7 @@ static void ShortcutConstructionSlopeUp() return; auto* windowMgr = GetWindowManager(); - WindowBase* window = windowMgr->FindByClass(WindowClass::Footpath); + WindowBase* window = windowMgr->FindByClass(WindowClass::footpath); if (window != nullptr) { WindowFootpathKeyboardShortcutSlopeUp(); @@ -687,7 +687,7 @@ static void ShortcutConstructionBuildCurrent() return; auto* windowMgr = GetWindowManager(); - WindowBase* window = windowMgr->FindByClass(WindowClass::Footpath); + WindowBase* window = windowMgr->FindByClass(WindowClass::footpath); if (window != nullptr) { WindowFootpathKeyboardShortcutBuildCurrent(); @@ -704,7 +704,7 @@ static void ShortcutConstructionSlopeDown() return; auto* windowMgr = GetWindowManager(); - WindowBase* window = windowMgr->FindByClass(WindowClass::Footpath); + WindowBase* window = windowMgr->FindByClass(WindowClass::footpath); if (window != nullptr) { WindowFootpathKeyboardShortcutSlopeDown(); @@ -721,7 +721,7 @@ static void ShortcutConstructionDemolishCurrent() return; auto* windowMgr = GetWindowManager(); - WindowBase* window = windowMgr->FindByClass(WindowClass::Footpath); + WindowBase* window = windowMgr->FindByClass(WindowClass::footpath); if (window != nullptr) { WindowFootpathKeyboardShortcutDemolishCurrent(); @@ -770,7 +770,7 @@ void ShortcutManager::RegisterDefaultShortcuts() if (gLegacyScene != LegacyScene::titleSequence) { auto* windowMgr = GetWindowManager(); - auto window = windowMgr->FindByClass(WindowClass::Error); + auto window = windowMgr->FindByClass(WindowClass::error); if (window != nullptr) { windowMgr->Close(*window); @@ -822,20 +822,20 @@ void ShortcutManager::RegisterDefaultShortcuts() RegisterShortcut(ShortcutId::kInterfaceOpenStaff, STR_SHORTCUT_SHOW_STAFF_LIST, "S", ShortcutShowStaffList); RegisterShortcut(ShortcutId::kInterfaceOpenMessages, STR_SHORTCUT_SHOW_RECENT_MESSAGES, "M", ShortcutShowRecentMessages); RegisterShortcut(ShortcutId::kInterfaceOpenMap, STR_SHORTCUT_SHOW_MAP, "TAB", ShortcutShowMap); - RegisterShortcut(ShortcutId::kInterfaceShowOptions, STR_SHORTCUT_SHOW_OPTIONS, std::bind(ContextOpenWindow, WindowClass::Options)); + RegisterShortcut(ShortcutId::kInterfaceShowOptions, STR_SHORTCUT_SHOW_OPTIONS, std::bind(ContextOpenWindow, WindowClass::options)); RegisterShortcut(ShortcutId::kInterfaceOpenKeyboardShortcuts, STR_SHORTCUT_OPEN_KEYBOARD_SHORTCUTS_WINDOW, "SHIFT+/", ShortcutOpenKeyboardShortcutsWindow); RegisterShortcut(ShortcutId::kInterfaceOpenTransparencyOptions, STR_SHORTCUT_OPEN_TRANSPARENCY_OPTIONS, "CTRL+T", ShortcutOpenTransparencyWindow); RegisterShortcut(ShortcutId::kInterfaceOpenCheats, STR_SHORTCUT_OPEN_CHEATS_WINDOW, "CTRL+ALT+C", ShortcutOpenCheatWindow); RegisterShortcut(ShortcutId::kInterfaceOpenTileInspector, STR_SHORTCUT_OPEN_TILE_INSPECTOR, []() { if (Config::Get().interface.ToolbarShowCheats) { - OpenWindow(WindowClass::TileInspector); + OpenWindow(WindowClass::tileInspector); } }); RegisterShortcut(ShortcutId::kInterfaceMultiplayerShow, STR_SHORTCUT_SHOW_MULTIPLAYER, []() { if (Network::GetMode() != Network::Mode::none) { - OpenWindow(WindowClass::Multiplayer); + OpenWindow(WindowClass::multiplayer); } }); @@ -864,7 +864,7 @@ void ShortcutManager::RegisterDefaultShortcuts() RegisterShortcut(ShortcutId::kViewToggleTrackHeightMarkers, STR_SHORTCUT_HEIGHT_MARKS_ON_RIDE_TRACKS_TOGGLE, "9", std::bind(ToggleViewFlag, VIEWPORT_FLAG_TRACK_HEIGHTS)); RegisterShortcut(ShortcutId::kViewToggleFootpathHeightMarkers, STR_SHORTCUT_HEIGHT_MARKS_ON_PATHS_TOGGLE, "0", std::bind(ToggleViewFlag, VIEWPORT_FLAG_PATH_HEIGHTS)); RegisterShortcut(ShortcutId::kViewToggleGridlines, STR_SHORTCUT_GRIDLINES_DISPLAY_TOGGLE, "7", std::bind(ToggleViewFlag, VIEWPORT_FLAG_GRIDLINES)); - RegisterShortcut(ShortcutId::kViewToggleCutAway, STR_SHORTCUT_VIEW_CLIPPING, std::bind(OpenWindow, WindowClass::ViewClipping)); + RegisterShortcut(ShortcutId::kViewToggleCutAway, STR_SHORTCUT_VIEW_CLIPPING, std::bind(OpenWindow, WindowClass::viewClipping)); RegisterShortcut(ShortcutId::kViewToggleFootpathIssues, STR_SHORTCUT_HIGHLIGHT_PATH_ISSUES_TOGGLE, "I", std::bind(ToggleViewFlag, VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES)); // Window @@ -907,14 +907,14 @@ void ShortcutManager::RegisterDefaultShortcuts() if (gLegacyScene != LegacyScene::titleSequence) { auto* windowMgr = GetWindowManager(); - auto window = windowMgr->FindByClass(WindowClass::DebugPaint); + auto window = windowMgr->FindByClass(WindowClass::debugPaint); if (window != nullptr) { windowMgr->Close(*window); } else { - ContextOpenWindow(WindowClass::DebugPaint); + ContextOpenWindow(WindowClass::debugPaint); } } }); diff --git a/src/openrct2-ui/interface/FileBrowser.cpp b/src/openrct2-ui/interface/FileBrowser.cpp index ea692418bd..8618e966b5 100644 --- a/src/openrct2-ui/interface/FileBrowser.cpp +++ b/src/openrct2-ui/interface/FileBrowser.cpp @@ -244,8 +244,8 @@ namespace OpenRCT2::Ui::FileBrowser // Closing this will cause a Ride window to pop up, so we have to do this to ensure that // no windows are open (besides the toolbars and LoadSave window). auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::RideConstruction); - windowMgr->CloseAllExceptClass(WindowClass::Loadsave); + windowMgr->CloseByClass(WindowClass::rideConstruction); + windowMgr->CloseAllExceptClass(WindowClass::loadsave); auto& gameState = getGameState(); @@ -261,13 +261,13 @@ namespace OpenRCT2::Ui::FileBrowser if (GetContext()->LoadParkFromFile(pathBuffer)) { InvokeCallback(ModalResult::ok, pathBuffer); - windowMgr->CloseByClass(WindowClass::Loadsave); + windowMgr->CloseByClass(WindowClass::loadsave); GfxInvalidateScreen(); } else { auto windowManager = GetWindowManager(); - if (!windowManager->FindByClass(WindowClass::Error)) + if (!windowManager->FindByClass(WindowClass::error)) { // Not the best message... ContextShowError(STR_LOAD_GAME, STR_FAILED_TO_LOAD_FILE_CONTAINS_INVALID_DATA, {}); @@ -305,7 +305,7 @@ namespace OpenRCT2::Ui::FileBrowser if (success) { - windowMgr->CloseByClass(WindowClass::Loadsave); + windowMgr->CloseByClass(WindowClass::loadsave); InvokeCallback(ModalResult::ok, pathBuffer); auto* context = GetContext(); @@ -322,16 +322,16 @@ namespace OpenRCT2::Ui::FileBrowser case (LoadSaveType::track): { SetAndSaveConfigPath(Config::Get().general.LastSaveTrackDirectory, pathBuffer); - auto intent = Intent(WindowClass::InstallTrack); + auto intent = Intent(WindowClass::installTrack); intent.PutExtra(INTENT_EXTRA_PATH, std::string{ pathBuffer }); ContextOpenIntent(&intent); - windowMgr->CloseByClass(WindowClass::Loadsave); + windowMgr->CloseByClass(WindowClass::loadsave); InvokeCallback(ModalResult::ok, pathBuffer); break; } case (LoadSaveType::heightmap): { - windowMgr->CloseByClass(WindowClass::Loadsave); + windowMgr->CloseByClass(WindowClass::loadsave); InvokeCallback(ModalResult::ok, pathBuffer); break; } @@ -352,7 +352,7 @@ namespace OpenRCT2::Ui::FileBrowser gIsAutosaveLoaded = false; gFirstTimeSaving = false; - windowMgr->CloseByClass(WindowClass::Loadsave); + windowMgr->CloseByClass(WindowClass::loadsave); GfxInvalidateScreen(); InvokeCallback(ModalResult::ok, pathBuffer); @@ -371,7 +371,7 @@ namespace OpenRCT2::Ui::FileBrowser if (ScenarioSave(gameState, pathBuffer, Config::Get().general.SavePluginData ? 3 : 2)) { gCurrentLoadedPath = pathBuffer; - windowMgr->CloseByClass(WindowClass::Loadsave); + windowMgr->CloseByClass(WindowClass::loadsave); GfxInvalidateScreen(); InvokeCallback(ModalResult::ok, pathBuffer); } @@ -394,7 +394,7 @@ namespace OpenRCT2::Ui::FileBrowser if (success) { - windowMgr->CloseByClass(WindowClass::Loadsave); + windowMgr->CloseByClass(WindowClass::loadsave); InvokeCallback(ModalResult::ok, pathBuffer); auto* context = GetContext(); @@ -421,7 +421,7 @@ namespace OpenRCT2::Ui::FileBrowser if (success) { - windowMgr->CloseByClass(WindowClass::Loadsave); + windowMgr->CloseByClass(WindowClass::loadsave); Windows::WindowRideMeasurementsDesignCancel(); InvokeCallback(ModalResult::ok, path); } diff --git a/src/openrct2-ui/interface/InGameConsole.cpp b/src/openrct2-ui/interface/InGameConsole.cpp index f9cc7649ee..0127ba3e49 100644 --- a/src/openrct2-ui/interface/InGameConsole.cpp +++ b/src/openrct2-ui/interface/InGameConsole.cpp @@ -296,7 +296,7 @@ void InGameConsole::Draw(RenderTarget& rt) const return; // Set font - ColourWithFlags textColour = { ThemeGetColour(WindowClass::Console, 1).colour, 0 }; + ColourWithFlags textColour = { ThemeGetColour(WindowClass::console, 1).colour, 0 }; const FontStyle style = InGameConsoleGetFontStyle(); const int32_t lineHeight = InGameConsoleGetLineHeight(); const int32_t maxLines = GetNumVisibleLines(); @@ -318,7 +318,7 @@ void InGameConsole::Draw(RenderTarget& rt) const FilterPaletteID::Palette51); // Paint background colour. - auto backgroundColour = ThemeGetColour(WindowClass::Console, 0); + auto backgroundColour = ThemeGetColour(WindowClass::console, 0); GfxFillRectInset(rt, { _consoleTopLeft, _consoleBottomRight }, backgroundColour, INSET_RECT_FLAG_FILL_NONE); GfxFillRectInset( rt, { _consoleTopLeft + ScreenCoordsXY{ 1, 1 }, _consoleBottomRight - ScreenCoordsXY{ 1, 1 } }, backgroundColour, diff --git a/src/openrct2-ui/interface/Theme.cpp b/src/openrct2-ui/interface/Theme.cpp index 49e5249715..1e7c7826b1 100644 --- a/src/openrct2-ui/interface/Theme.cpp +++ b/src/openrct2-ui/interface/Theme.cpp @@ -113,7 +113,7 @@ namespace OpenRCT2::Ui #define COLOURS_5(c0, c1, c2, c3, c4) 5, { { (c0), (c1), (c2), (c3), (c4), 0 } } #define COLOURS_6(c0, c1, c2, c3, c4, c5) 6, { { (c0), (c1), (c2), (c3), (c4), (c5) } } -#define THEME_DEF_END { WindowClass::Null, { 0, 0, 0, 0, 0, 0 } } +#define THEME_DEF_END { WindowClass::null, { 0, 0, 0, 0, 0, 0 } } #define TWINDOW(window_class, window_name, window_string_id, theme) { window_class, window_name, window_string_id, theme } @@ -129,73 +129,73 @@ static constexpr ColourWithFlags translucent(colour_t colour) static constexpr WindowThemeDesc WindowThemeDescriptors[] = { // WindowClass WindowClassSZ WindowName NumColours, DefaultTheme - { WindowClass::TopToolbar, "WC_TOP_TOOLBAR", STR_THEMES_WINDOW_TOP_TOOLBAR, COLOURS_4(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_GREY) ) }, - { WindowClass::BottomToolbar, "WC_BOTTOM_TOOLBAR", STR_THEMES_WINDOW_BOTTOM_TOOLBAR, COLOURS_4(translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN), opaque(COLOUR_BLACK), opaque(COLOUR_BRIGHT_GREEN) ) }, - { WindowClass::Ride, "WC_RIDE", STR_THEMES_WINDOW_RIDE, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_SATURATED_GREEN) ) }, - { WindowClass::RideConstruction, "WC_RIDE_CONSTRUCTION", STR_THEMES_WINDOW_RIDE_CONSTRUCTION, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, - { WindowClass::RideList, "WC_RIDE_LIST", STR_THEMES_WINDOW_RIDE_LIST, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED) ) }, - { WindowClass::SavePrompt, "WC_SAVE_PROMPT", STR_THEMES_WINDOW_SAVE_PROMPT, COLOURS_1(translucent(COLOUR_BORDEAUX_RED) ) }, - { WindowClass::ConstructRide, "WC_CONSTRUCT_RIDE", STR_THEMES_WINDOW_CONSTRUCT_RIDE, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED) ) }, - { WindowClass::DemolishRidePrompt, "WC_DEMOLISH_RIDE_PROMPT", STR_THEMES_WINDOW_DEMOLISH_RIDE_PROMPT, COLOURS_1(translucent(COLOUR_BORDEAUX_RED) ) }, - { WindowClass::Error, "WC_ERROR", STR_THEMES_WINDOW_ERROR, COLOURS_1(translucent(COLOUR_BORDEAUX_RED) ) }, - { WindowClass::Scenery, "WC_SCENERY", STR_THEMES_WINDOW_SCENERY, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_GREEN) ) }, - { WindowClass::SceneryScatter, "WC_SCENERY_SCATTER", STR_THEMES_WINDOW_SCENERY_SCATTER, COLOURS_2(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_GREEN) ) }, - { WindowClass::Options, "WC_OPTIONS", STR_THEMES_WINDOW_OPTIONS, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, - { WindowClass::AssetPacks, "WC_ASSET_PACKS", STR_ASSET_PACKS, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, - { WindowClass::Footpath, "WC_FOOTPATH", STR_THEMES_WINDOW_FOOTPATH, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, - { WindowClass::Land, "WC_LAND", STR_THEMES_WINDOW_LAND, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, - { WindowClass::Water, "WC_WATER", STR_THEMES_WINDOW_WATER, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, - { WindowClass::Peep, "WC_PEEP", STR_THEMES_WINDOW_PEEP, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_OLIVE_GREEN), opaque(COLOUR_OLIVE_GREEN) ) }, - { WindowClass::GuestList, "WC_GUEST_LIST", STR_THEMES_WINDOW_GUEST_LIST, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_OLIVE_GREEN), opaque(COLOUR_OLIVE_GREEN) ) }, - { WindowClass::StaffList, "WC_STAFF_LIST", STR_THEMES_WINDOW_STAFF_LIST, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE) ) }, - { WindowClass::FirePrompt, "WC_FIRE_PROMPT", STR_THEMES_WINDOW_FIRE_PROMPT, COLOURS_1(translucent(COLOUR_BORDEAUX_RED) ) }, - { WindowClass::ParkInformation, "WC_PARK_INFORMATION", STR_THEMES_WINDOW_PARK_INFORMATION, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW) ) }, - { WindowClass::Finances, "WC_FINANCES", STR_THEMES_WINDOW_FINANCES, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW) ) }, - { WindowClass::TitleMenu, "WC_TITLE_MENU", STR_THEMES_WINDOW_TITLE_MENU_BUTTONS, COLOURS_3(translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN) ) }, - { WindowClass::TitleExit, "WC_TITLE_EXIT", STR_THEMES_WINDOW_TITLE_MENU_EXIT, COLOURS_3(translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN) ) }, - { WindowClass::RecentNews, "WC_RECENT_NEWS", STR_THEMES_WINDOW_RECENT_NEWS, COLOURS_3(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_GREY), opaque(COLOUR_BLACK) ) }, - { WindowClass::ScenarioSelect, "WC_SCENARIO_SELECT", STR_THEMES_WINDOW_TITLE_MENU_SCENARIO_SELECTION, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED) ) }, - { WindowClass::TrackDesignList, "WC_TRACK_DESIGN_LIST", STR_THEMES_WINDOW_TRACK_DESIGN_LIST, COLOURS_3(opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED) ) }, - { WindowClass::TrackDesignPlace, "WC_TRACK_DESIGN_PLACE", STR_THEMES_WINDOW_TRACK_DESIGN_PLACE, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, - { WindowClass::NewCampaign, "WC_NEW_CAMPAIGN", STR_THEMES_WINDOW_NEW_CAMPAIGN, COLOURS_3(opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW) ) }, - { WindowClass::KeyboardShortcutList, "WC_KEYBOARD_SHORTCUT_LIST", STR_THEMES_WINDOW_KEYBOARD_SHORTCUT_LIST, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, - { WindowClass::ChangeKeyboardShortcut, "WC_CHANGE_KEYBOARD_SHORTCUT", STR_THEMES_WINDOW_CHANGE_KEYBOARD_SHORTCUT, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, - { WindowClass::ResetShortcutKeysPrompt, "WC_RESET_SHORTCUT_KEYS_PROMPT", STR_SHORTCUT_ACTION_RESET, COLOURS_1(translucent(COLOUR_BORDEAUX_RED) ) }, - { WindowClass::Map, "WC_MAP", STR_THEMES_WINDOW_MAP, COLOURS_2(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_BROWN) ) }, - { WindowClass::Banner, "WC_BANNER", STR_THEMES_WINDOW_BANNER, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, - { WindowClass::EditorObjectSelection, "WC_EDITOR_OBJECT_SELECTION", STR_THEMES_WINDOW_EDITOR_OBJECT_SELECTION, COLOURS_3(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_GREY), opaque(COLOUR_GREY) ) }, - { WindowClass::EditorInventionList, "WC_EDITOR_INVENTION_LIST", STR_THEMES_WINDOW_EDITOR_INVENTION_LIST, COLOURS_3(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_GREY), opaque(COLOUR_GREY) ) }, - { WindowClass::EditorScenarioOptions, "WC_EDITOR_SCENARIO_OPTIONS", STR_THEMES_WINDOW_EDITOR_SCENARIO_OPTIONS, COLOURS_3(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_GREY), opaque(COLOUR_GREY) ) }, - { WindowClass::ManageTrackDesign, "WC_MANAGE_TRACK_DESIGN", STR_THEMES_WINDOW_MANAGE_TRACK_DESIGN, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_GREY) ) }, - { WindowClass::TrackDeletePrompt, "WC_TRACK_DELETE_PROMPT", STR_THEMES_WINDOW_TRACK_DELETE_PROMPT, COLOURS_3(opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED) ) }, - { WindowClass::InstallTrack, "WC_INSTALL_TRACK", STR_THEMES_WINDOW_INSTALL_TRACK, COLOURS_3(opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED) ) }, - { WindowClass::ClearScenery, "WC_CLEAR_SCENERY", STR_THEMES_WINDOW_CLEAR_SCENERY, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, - { WindowClass::Cheats, "WC_CHEATS", STR_CHEAT_TITLE, COLOURS_2(opaque(COLOUR_GREY), opaque(COLOUR_DARK_YELLOW) ) }, - { WindowClass::Research, "WC_RESEARCH", STR_THEMES_WINDOW_RESEARCH, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW) ) }, - { WindowClass::Viewport, "WC_VIEWPORT", STR_THEMES_WINDOW_VIEWPORT, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, - { WindowClass::Mapgen, "WC_MAPGEN", STR_THEMES_WINDOW_MAPGEN, COLOURS_3(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, - { WindowClass::Loadsave, "WC_LOADSAVE", STR_THEMES_WINDOW_LOADSAVE, COLOURS_3(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_GREEN) ) }, - { WindowClass::LoadsaveOverwritePrompt, "WC_LOADSAVE_OVERWRITE_PROMPT", STR_THEMES_WINDOW_LOADSAVE_OVERWRITE_PROMPT, COLOURS_1(translucent(COLOUR_BORDEAUX_RED) ) }, - { WindowClass::TitleOptions, "WC_TITLE_OPTIONS", STR_THEMES_WINDOW_TITLE_MENU_OPTIONS, COLOURS_3(translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN) ) }, - { WindowClass::LandRights, "WC_LAND_RIGHTS", STR_THEMES_WINDOW_LAND_RIGHTS, COLOURS_3(opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW) ) }, - { WindowClass::Themes, "WC_THEMES", STR_THEMES_WINDOW_THEMES, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_GREEN) ) }, - { WindowClass::Staff, "WC_STAFF", STR_THEMES_WINDOW_STAFF, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE) ) }, - { WindowClass::EditorTrackBottomToolbar, "WC_EDITOR_TRACK_BOTTOM_TOOLBAR", STR_THEMES_WINDOW_BOTTOM_TOOLBAR_TRACK_EDITOR, COLOURS_3(translucent(COLOUR_LIGHT_BLUE), translucent(COLOUR_LIGHT_BLUE), translucent(COLOUR_LIGHT_BLUE) ) }, - { WindowClass::EditorScenarioBottomToolbar, "WC_EDITOR_SCENARIO_BOTTOM_TOOLBAR", STR_THEMES_WINDOW_BOTTOM_TOOLBAR_SCENARIO_EDITOR, COLOURS_3(translucent(COLOUR_LIGHT_BROWN), translucent(COLOUR_LIGHT_BROWN), translucent(COLOUR_MOSS_GREEN) ) }, - { WindowClass::TileInspector, "WC_TILE_INSPECTOR", STR_TILE_INSPECTOR_TITLE, COLOURS_2(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, - { WindowClass::ViewClipping, "WC_VIEW_CLIPPING", STR_VIEW_CLIPPING_TITLE, COLOURS_1(opaque(COLOUR_DARK_GREEN) ) }, - { WindowClass::PatrolArea, "WC_PATROL_AREA", STR_SET_PATROL_AREA, COLOURS_3(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE) ) }, - { WindowClass::Transparency, "WC_TRANSPARENCY", STR_TRANSPARENCY_OPTIONS_TITLE, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, - { WindowClass::About, "WC_ABOUT", STR_ABOUT, COLOURS_2(opaque(COLOUR_GREY), opaque(COLOUR_LIGHT_BLUE) ) }, - { WindowClass::Changelog, "WC_CHANGELOG", STR_CHANGELOG_TITLE, COLOURS_2(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, - { WindowClass::Multiplayer, "WC_MULTIPLAYER", STR_MULTIPLAYER, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, - { WindowClass::Player, "WC_PLAYER", STR_THEMES_WINDOW_PLAYER, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, - { WindowClass::NetworkStatus, "WC_NETWORK_STATUS", STR_THEMES_WINDOW_NETWORK_STATUS, COLOURS_1(opaque(COLOUR_BLACK) ) }, - { WindowClass::ServerList, "WC_SERVER_LIST", STR_SERVER_LIST, COLOURS_2(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, - { WindowClass::Chat, "WC_CHAT", STR_CHAT, COLOURS_1(translucent(COLOUR_GREY) ) }, - { WindowClass::Console, "WC_CONSOLE", STR_CONSOLE, COLOURS_2(translucent(COLOUR_LIGHT_BLUE), opaque(COLOUR_WHITE) ) }, - { WindowClass::ProgressWindow, "WC_PROGRESS_WINDOW", STR_THEME_LOADING_WINDOW, COLOURS_1(opaque(COLOUR_BLACK) ) }, - { WindowClass::EditorParkEntrance, "WC_EDITOR_PARK_ENTRANCE", STR_OBJECT_SELECTION_PARK_ENTRANCE, COLOURS_2(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::topToolbar, "WC_TOP_TOOLBAR", STR_THEMES_WINDOW_TOP_TOOLBAR, COLOURS_4(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_GREY) ) }, + { WindowClass::bottomToolbar, "WC_BOTTOM_TOOLBAR", STR_THEMES_WINDOW_BOTTOM_TOOLBAR, COLOURS_4(translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN), opaque(COLOUR_BLACK), opaque(COLOUR_BRIGHT_GREEN) ) }, + { WindowClass::ride, "WC_RIDE", STR_THEMES_WINDOW_RIDE, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_SATURATED_GREEN) ) }, + { WindowClass::rideConstruction, "WC_RIDE_CONSTRUCTION", STR_THEMES_WINDOW_RIDE_CONSTRUCTION, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::rideList, "WC_RIDE_LIST", STR_THEMES_WINDOW_RIDE_LIST, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::savePrompt, "WC_SAVE_PROMPT", STR_THEMES_WINDOW_SAVE_PROMPT, COLOURS_1(translucent(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::constructRide, "WC_CONSTRUCT_RIDE", STR_THEMES_WINDOW_CONSTRUCT_RIDE, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::demolishRidePrompt, "WC_DEMOLISH_RIDE_PROMPT", STR_THEMES_WINDOW_DEMOLISH_RIDE_PROMPT, COLOURS_1(translucent(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::error, "WC_ERROR", STR_THEMES_WINDOW_ERROR, COLOURS_1(translucent(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::scenery, "WC_SCENERY", STR_THEMES_WINDOW_SCENERY, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_GREEN) ) }, + { WindowClass::sceneryScatter, "WC_SCENERY_SCATTER", STR_THEMES_WINDOW_SCENERY_SCATTER, COLOURS_2(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_GREEN) ) }, + { WindowClass::options, "WC_OPTIONS", STR_THEMES_WINDOW_OPTIONS, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::assetPacks, "WC_ASSET_PACKS", STR_ASSET_PACKS, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::footpath, "WC_FOOTPATH", STR_THEMES_WINDOW_FOOTPATH, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::land, "WC_LAND", STR_THEMES_WINDOW_LAND, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::water, "WC_WATER", STR_THEMES_WINDOW_WATER, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::peep, "WC_PEEP", STR_THEMES_WINDOW_PEEP, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_OLIVE_GREEN), opaque(COLOUR_OLIVE_GREEN) ) }, + { WindowClass::guestList, "WC_GUEST_LIST", STR_THEMES_WINDOW_GUEST_LIST, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_OLIVE_GREEN), opaque(COLOUR_OLIVE_GREEN) ) }, + { WindowClass::staffList, "WC_STAFF_LIST", STR_THEMES_WINDOW_STAFF_LIST, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE) ) }, + { WindowClass::firePrompt, "WC_FIRE_PROMPT", STR_THEMES_WINDOW_FIRE_PROMPT, COLOURS_1(translucent(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::parkInformation, "WC_PARK_INFORMATION", STR_THEMES_WINDOW_PARK_INFORMATION, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW) ) }, + { WindowClass::finances, "WC_FINANCES", STR_THEMES_WINDOW_FINANCES, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW) ) }, + { WindowClass::titleMenu, "WC_TITLE_MENU", STR_THEMES_WINDOW_TITLE_MENU_BUTTONS, COLOURS_3(translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN) ) }, + { WindowClass::titleExit, "WC_TITLE_EXIT", STR_THEMES_WINDOW_TITLE_MENU_EXIT, COLOURS_3(translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN) ) }, + { WindowClass::recentNews, "WC_RECENT_NEWS", STR_THEMES_WINDOW_RECENT_NEWS, COLOURS_3(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_GREY), opaque(COLOUR_BLACK) ) }, + { WindowClass::scenarioSelect, "WC_SCENARIO_SELECT", STR_THEMES_WINDOW_TITLE_MENU_SCENARIO_SELECTION, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::trackDesignList, "WC_TRACK_DESIGN_LIST", STR_THEMES_WINDOW_TRACK_DESIGN_LIST, COLOURS_3(opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::trackDesignPlace, "WC_TRACK_DESIGN_PLACE", STR_THEMES_WINDOW_TRACK_DESIGN_PLACE, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::newCampaign, "WC_NEW_CAMPAIGN", STR_THEMES_WINDOW_NEW_CAMPAIGN, COLOURS_3(opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW) ) }, + { WindowClass::keyboardShortcutList, "WC_KEYBOARD_SHORTCUT_LIST", STR_THEMES_WINDOW_KEYBOARD_SHORTCUT_LIST, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::changeKeyboardShortcut, "WC_CHANGE_KEYBOARD_SHORTCUT", STR_THEMES_WINDOW_CHANGE_KEYBOARD_SHORTCUT, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::resetShortcutKeysPrompt, "WC_RESET_SHORTCUT_KEYS_PROMPT", STR_SHORTCUT_ACTION_RESET, COLOURS_1(translucent(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::map, "WC_MAP", STR_THEMES_WINDOW_MAP, COLOURS_2(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::banner, "WC_BANNER", STR_THEMES_WINDOW_BANNER, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::editorObjectSelection, "WC_EDITOR_OBJECT_SELECTION", STR_THEMES_WINDOW_EDITOR_OBJECT_SELECTION, COLOURS_3(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_GREY), opaque(COLOUR_GREY) ) }, + { WindowClass::editorInventionList, "WC_EDITOR_INVENTION_LIST", STR_THEMES_WINDOW_EDITOR_INVENTION_LIST, COLOURS_3(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_GREY), opaque(COLOUR_GREY) ) }, + { WindowClass::editorScenarioOptions, "WC_EDITOR_SCENARIO_OPTIONS", STR_THEMES_WINDOW_EDITOR_SCENARIO_OPTIONS, COLOURS_3(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_GREY), opaque(COLOUR_GREY) ) }, + { WindowClass::manageTrackDesign, "WC_MANAGE_TRACK_DESIGN", STR_THEMES_WINDOW_MANAGE_TRACK_DESIGN, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_GREY) ) }, + { WindowClass::trackDeletePrompt, "WC_TRACK_DELETE_PROMPT", STR_THEMES_WINDOW_TRACK_DELETE_PROMPT, COLOURS_3(opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::installTrack, "WC_INSTALL_TRACK", STR_THEMES_WINDOW_INSTALL_TRACK, COLOURS_3(opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::clearScenery, "WC_CLEAR_SCENERY", STR_THEMES_WINDOW_CLEAR_SCENERY, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::cheats, "WC_CHEATS", STR_CHEAT_TITLE, COLOURS_2(opaque(COLOUR_GREY), opaque(COLOUR_DARK_YELLOW) ) }, + { WindowClass::research, "WC_RESEARCH", STR_THEMES_WINDOW_RESEARCH, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW) ) }, + { WindowClass::viewport, "WC_VIEWPORT", STR_THEMES_WINDOW_VIEWPORT, COLOURS_3(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::mapgen, "WC_MAPGEN", STR_THEMES_WINDOW_MAPGEN, COLOURS_3(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN) ) }, + { WindowClass::loadsave, "WC_LOADSAVE", STR_THEMES_WINDOW_LOADSAVE, COLOURS_3(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_GREEN) ) }, + { WindowClass::loadsaveOverwritePrompt, "WC_LOADSAVE_OVERWRITE_PROMPT", STR_THEMES_WINDOW_LOADSAVE_OVERWRITE_PROMPT, COLOURS_1(translucent(COLOUR_BORDEAUX_RED) ) }, + { WindowClass::titleOptions, "WC_TITLE_OPTIONS", STR_THEMES_WINDOW_TITLE_MENU_OPTIONS, COLOURS_3(translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN), translucent(COLOUR_DARK_GREEN) ) }, + { WindowClass::landRights, "WC_LAND_RIGHTS", STR_THEMES_WINDOW_LAND_RIGHTS, COLOURS_3(opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW), opaque(COLOUR_DARK_YELLOW) ) }, + { WindowClass::themes, "WC_THEMES", STR_THEMES_WINDOW_THEMES, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_GREEN) ) }, + { WindowClass::staff, "WC_STAFF", STR_THEMES_WINDOW_STAFF, COLOURS_3(opaque(COLOUR_GREY), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE) ) }, + { WindowClass::editorTrackBottomToolbar, "WC_EDITOR_TRACK_BOTTOM_TOOLBAR", STR_THEMES_WINDOW_BOTTOM_TOOLBAR_TRACK_EDITOR, COLOURS_3(translucent(COLOUR_LIGHT_BLUE), translucent(COLOUR_LIGHT_BLUE), translucent(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::editorScenarioBottomToolbar, "WC_EDITOR_SCENARIO_BOTTOM_TOOLBAR", STR_THEMES_WINDOW_BOTTOM_TOOLBAR_SCENARIO_EDITOR, COLOURS_3(translucent(COLOUR_LIGHT_BROWN), translucent(COLOUR_LIGHT_BROWN), translucent(COLOUR_MOSS_GREEN) ) }, + { WindowClass::tileInspector, "WC_TILE_INSPECTOR", STR_TILE_INSPECTOR_TITLE, COLOURS_2(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::viewClipping, "WC_VIEW_CLIPPING", STR_VIEW_CLIPPING_TITLE, COLOURS_1(opaque(COLOUR_DARK_GREEN) ) }, + { WindowClass::patrolArea, "WC_PATROL_AREA", STR_SET_PATROL_AREA, COLOURS_3(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE) ) }, + { WindowClass::transparency, "WC_TRANSPARENCY", STR_TRANSPARENCY_OPTIONS_TITLE, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::about, "WC_ABOUT", STR_ABOUT, COLOURS_2(opaque(COLOUR_GREY), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::changelog, "WC_CHANGELOG", STR_CHANGELOG_TITLE, COLOURS_2(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::multiplayer, "WC_MULTIPLAYER", STR_MULTIPLAYER, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::player, "WC_PLAYER", STR_THEMES_WINDOW_PLAYER, COLOURS_3(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::networkStatus, "WC_NETWORK_STATUS", STR_THEMES_WINDOW_NETWORK_STATUS, COLOURS_1(opaque(COLOUR_BLACK) ) }, + { WindowClass::serverList, "WC_SERVER_LIST", STR_SERVER_LIST, COLOURS_2(opaque(COLOUR_LIGHT_BLUE), opaque(COLOUR_LIGHT_BLUE) ) }, + { WindowClass::chat, "WC_CHAT", STR_CHAT, COLOURS_1(translucent(COLOUR_GREY) ) }, + { WindowClass::console, "WC_CONSOLE", STR_CONSOLE, COLOURS_2(translucent(COLOUR_LIGHT_BLUE), opaque(COLOUR_WHITE) ) }, + { WindowClass::progressWindow, "WC_PROGRESS_WINDOW", STR_THEME_LOADING_WINDOW, COLOURS_1(opaque(COLOUR_BLACK) ) }, + { WindowClass::editorParkEntrance, "WC_EDITOR_PARK_ENTRANCE", STR_OBJECT_SELECTION_PARK_ENTRANCE, COLOURS_2(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_DARK_BROWN) ) }, }; #pragma endregion @@ -206,29 +206,29 @@ static constexpr WindowThemeDesc WindowThemeDescriptors[] = static constexpr UIThemeWindowEntry PredefinedThemeRCT1_Entries[] = { - { WindowClass::TopToolbar, COLOURS_RCT1(opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::BottomToolbar, COLOURS_RCT1(translucent(COLOUR_GREY), translucent(COLOUR_GREY), opaque(COLOUR_VOID), opaque(COLOUR_YELLOW), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::Ride, COLOURS_RCT1(opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_GREY), opaque(COLOUR_SATURATED_GREEN), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::RideList, COLOURS_RCT1(opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::ConstructRide, COLOURS_RCT1(opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::Peep, COLOURS_RCT1(opaque(COLOUR_LIGHT_BROWN), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::GuestList, COLOURS_RCT1(opaque(COLOUR_LIGHT_BROWN), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::StaffList, COLOURS_RCT1(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::Finances, COLOURS_RCT1(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::TitleMenu, COLOURS_RCT1(translucent(COLOUR_GREY), translucent(COLOUR_GREY), translucent(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::TitleExit, COLOURS_RCT1(translucent(COLOUR_GREY), translucent(COLOUR_GREY), translucent(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::NewCampaign, COLOURS_RCT1(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::TitleOptions, COLOURS_RCT1(translucent(COLOUR_GREY), translucent(COLOUR_GREY), translucent(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::Staff, COLOURS_RCT1(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::Options, COLOURS_RCT1(opaque(COLOUR_GREY), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::AssetPacks, COLOURS_RCT1(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::KeyboardShortcutList, COLOURS_RCT1(opaque(COLOUR_GREY), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::ChangeKeyboardShortcut, COLOURS_RCT1(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::RecentNews, COLOURS_RCT1(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::TrackDesignList, COLOURS_RCT1(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::Map, COLOURS_RCT1(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::About, COLOURS_RCT1(opaque(COLOUR_GREY), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_WHITE), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, - { WindowClass::Changelog, COLOURS_RCT1(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_WHITE), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::topToolbar, COLOURS_RCT1(opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::bottomToolbar, COLOURS_RCT1(translucent(COLOUR_GREY), translucent(COLOUR_GREY), opaque(COLOUR_VOID), opaque(COLOUR_YELLOW), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::ride, COLOURS_RCT1(opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_GREY), opaque(COLOUR_SATURATED_GREEN), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::rideList, COLOURS_RCT1(opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::constructRide, COLOURS_RCT1(opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::peep, COLOURS_RCT1(opaque(COLOUR_LIGHT_BROWN), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::guestList, COLOURS_RCT1(opaque(COLOUR_LIGHT_BROWN), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BORDEAUX_RED), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::staffList, COLOURS_RCT1(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::finances, COLOURS_RCT1(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::titleMenu, COLOURS_RCT1(translucent(COLOUR_GREY), translucent(COLOUR_GREY), translucent(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::titleExit, COLOURS_RCT1(translucent(COLOUR_GREY), translucent(COLOUR_GREY), translucent(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::newCampaign, COLOURS_RCT1(opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::titleOptions, COLOURS_RCT1(translucent(COLOUR_GREY), translucent(COLOUR_GREY), translucent(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::staff, COLOURS_RCT1(opaque(COLOUR_DARK_GREEN), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_LIGHT_PURPLE), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::options, COLOURS_RCT1(opaque(COLOUR_GREY), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::assetPacks, COLOURS_RCT1(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::keyboardShortcutList, COLOURS_RCT1(opaque(COLOUR_GREY), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::changeKeyboardShortcut, COLOURS_RCT1(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::recentNews, COLOURS_RCT1(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::trackDesignList, COLOURS_RCT1(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::map, COLOURS_RCT1(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_GREY), opaque(COLOUR_GREY), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::about, COLOURS_RCT1(opaque(COLOUR_GREY), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_WHITE), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, + { WindowClass::changelog, COLOURS_RCT1(opaque(COLOUR_DARK_BROWN), opaque(COLOUR_DARK_BROWN), opaque(COLOUR_WHITE), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK), opaque(COLOUR_BLACK)) }, THEME_DEF_END, }; // clang-format on @@ -519,7 +519,7 @@ static constexpr UIThemeWindowEntry PredefinedThemeRCT1_Entries[] = theme.Flags = flags | UITHEME_FLAG_PREDEFINED; size_t numEntries = 0; - for (const UIThemeWindowEntry* entry = entries; entry->Class != WindowClass::Null; entry++) + for (const UIThemeWindowEntry* entry = entries; entry->Class != WindowClass::null; entry++) { numEntries++; } diff --git a/src/openrct2-ui/interface/ViewportInteraction.cpp b/src/openrct2-ui/interface/ViewportInteraction.cpp index 0f30ccea69..e1b2fbd1c8 100644 --- a/src/openrct2-ui/interface/ViewportInteraction.cpp +++ b/src/openrct2-ui/interface/ViewportInteraction.cpp @@ -215,7 +215,7 @@ namespace OpenRCT2::Ui case EntityType::Guest: case EntityType::Staff: { - auto intent = Intent(WindowClass::Peep); + auto intent = Intent(WindowClass::peep); intent.PutExtra(INTENT_EXTRA_PEEP, entity); ContextOpenIntent(&intent); break; @@ -254,7 +254,7 @@ namespace OpenRCT2::Ui return true; } case ViewportInteractionItem::parkEntrance: - ContextOpenWindow(WindowClass::ParkInformation); + ContextOpenWindow(WindowClass::parkInformation); return true; default: return false; @@ -470,8 +470,8 @@ namespace OpenRCT2::Ui if (!gInputFlags.has(InputFlag::unk6) || !gInputFlags.has(InputFlag::toolActive)) { auto* windowMgr = GetWindowManager(); - if (windowMgr->FindByClass(WindowClass::RideConstruction) == nullptr - && windowMgr->FindByClass(WindowClass::Footpath) == nullptr) + if (windowMgr->FindByClass(WindowClass::rideConstruction) == nullptr + && windowMgr->FindByClass(WindowClass::footpath) == nullptr) { info.interactionType = ViewportInteractionItem::none; return info; @@ -638,7 +638,7 @@ namespace OpenRCT2::Ui static void ViewportInteractionRemoveFootpath(const PathElement& pathElement, const CoordsXY& mapCoords) { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::Footpath); + WindowBase* w = windowMgr->FindByClass(WindowClass::footpath); if (w != nullptr) FootpathUpdateProvisional(); diff --git a/src/openrct2-ui/interface/Widget.cpp b/src/openrct2-ui/interface/Widget.cpp index c0d48f6467..4e75c5d0e6 100644 --- a/src/openrct2-ui/interface/Widget.cpp +++ b/src/openrct2-ui/interface/Widget.cpp @@ -864,14 +864,14 @@ namespace OpenRCT2::Ui bool widgetIsDisabled(const WindowBase& w, WidgetIndex widgetIndex) { - if (w.classification == WindowClass::Custom) + if (w.classification == WindowClass::custom) return w.widgets[widgetIndex].flags.has(WidgetFlag::isDisabled); return (w.disabledWidgets & (1LL << widgetIndex)) != 0; } bool widgetIsHoldable(const WindowBase& w, WidgetIndex widgetIndex) { - if (w.classification == WindowClass::Custom) + if (w.classification == WindowClass::custom) return w.widgets[widgetIndex].flags.has(WidgetFlag::isHoldable); return (w.holdDownWidgets & (1LL << widgetIndex)) != 0; } @@ -883,7 +883,7 @@ namespace OpenRCT2::Ui bool widgetIsPressed(const WindowBase& w, WidgetIndex widgetIndex) { - if (w.classification == WindowClass::Custom) + if (w.classification == WindowClass::custom) { if (w.widgets[widgetIndex].flags.has(WidgetFlag::isPressed)) { diff --git a/src/openrct2-ui/interface/Window.cpp b/src/openrct2-ui/interface/Window.cpp index a1f05ac0f5..f2b3cef84a 100644 --- a/src/openrct2-ui/interface/Window.cpp +++ b/src/openrct2-ui/interface/Window.cpp @@ -275,7 +275,7 @@ namespace OpenRCT2::Ui if (w != nullptr) { // Check if main window - if (w->classification == WindowClass::MainWindow || w->classification == WindowClass::Viewport) + if (w->classification == WindowClass::mainWindow || w->classification == WindowClass::viewport) { WindowViewportWheelInput(*w, relative_wheel); return; @@ -525,7 +525,7 @@ namespace OpenRCT2::Ui::Windows static int32_t _textBoxFrameNo = 0; static bool _usingWidgetTextBox = false; static TextInputSession* _textInput; - static WidgetIdentifier _currentTextBox = { { WindowClass::Null, 0 }, 0 }; + static WidgetIdentifier _currentTextBox = { { WindowClass::null, 0 }, 0 }; WindowBase* WindowGetListening() { @@ -564,7 +564,7 @@ namespace OpenRCT2::Ui::Windows _textBoxFrameNo = 0; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::Textinput); + windowMgr->CloseByClass(WindowClass::textinput); _textBoxInput = existingText; @@ -577,7 +577,7 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); WindowBase* w = windowMgr->FindByNumber(_currentTextBox.window.classification, _currentTextBox.window.number); - _currentTextBox.window.classification = WindowClass::Null; + _currentTextBox.window.classification = WindowClass::null; _currentTextBox.window.number = 0; ContextStopTextInput(); _usingWidgetTextBox = false; @@ -964,7 +964,7 @@ namespace OpenRCT2::Ui::Windows { // Not sure why plugin windows have to be treated differently, // but they currently show a deviation if we don't. - if (w.classification == WindowClass::Custom) + if (w.classification == WindowClass::custom) { w.minHeight += w.getTitleBarDiffTarget(); w.maxHeight += w.getTitleBarDiffTarget(); diff --git a/src/openrct2-ui/ride/VehicleSounds.cpp b/src/openrct2-ui/ride/VehicleSounds.cpp index a68d9c007f..bd67a80e77 100644 --- a/src/openrct2-ui/ride/VehicleSounds.cpp +++ b/src/openrct2-ui/ride/VehicleSounds.cpp @@ -127,7 +127,7 @@ namespace OpenRCT2::Audio auto left = gMusicTrackingViewport->viewPos.x; auto bottom = gMusicTrackingViewport->viewPos.y; - if (Ui::Windows::WindowGetClassification(*gWindowAudioExclusive) == WindowClass::MainWindow) + if (Ui::Windows::WindowGetClassification(*gWindowAudioExclusive) == WindowClass::mainWindow) { left -= quarter_w; bottom -= quarter_h; @@ -139,7 +139,7 @@ namespace OpenRCT2::Audio auto right = gMusicTrackingViewport->ViewWidth() + left; auto top = gMusicTrackingViewport->ViewHeight() + bottom; - if (Ui::Windows::WindowGetClassification(*gWindowAudioExclusive) == WindowClass::MainWindow) + if (Ui::Windows::WindowGetClassification(*gWindowAudioExclusive) == WindowClass::mainWindow) { right += quarter_w + quarter_w; top += quarter_h + quarter_h; diff --git a/src/openrct2-ui/scripting/CustomMenu.cpp b/src/openrct2-ui/scripting/CustomMenu.cpp index 3b93d61ff7..17d6b68337 100644 --- a/src/openrct2-ui/scripting/CustomMenu.cpp +++ b/src/openrct2-ui/scripting/CustomMenu.cpp @@ -270,7 +270,7 @@ namespace OpenRCT2::Scripting customTool.onFinish = dukValue["onFinish"]; auto* windowMgr = GetWindowManager(); - auto toolbarWindow = windowMgr->FindByClass(WindowClass::TopToolbar); + auto toolbarWindow = windowMgr->FindByClass(WindowClass::topToolbar); if (toolbarWindow != nullptr) { // Use a widget that does not exist on top toolbar but also make sure it isn't diff --git a/src/openrct2-ui/scripting/CustomWindow.cpp b/src/openrct2-ui/scripting/CustomWindow.cpp index 9770e0fa03..4c4b54905a 100644 --- a/src/openrct2-ui/scripting/CustomWindow.cpp +++ b/src/openrct2-ui/scripting/CustomWindow.cpp @@ -1118,7 +1118,7 @@ namespace OpenRCT2::Ui::Windows { auto result = _nextWindowNumber++; auto* windowMgr = GetWindowManager(); - while (windowMgr->FindByNumber(WindowClass::Custom, result) != nullptr) + while (windowMgr->FindByNumber(WindowClass::custom, result) != nullptr) { result++; } @@ -1138,11 +1138,11 @@ namespace OpenRCT2::Ui::Windows if (desc.X && desc.Y) { window = windowMgr->Create( - WindowClass::Custom, { *desc.X, *desc.Y }, desc.size, windowFlags, owner, desc); + WindowClass::custom, { *desc.X, *desc.Y }, desc.size, windowFlags, owner, desc); } else { - window = windowMgr->Create(WindowClass::Custom, desc.size, windowFlags, owner, desc); + window = windowMgr->Create(WindowClass::custom, desc.size, windowFlags, owner, desc); } return window; } @@ -1167,7 +1167,7 @@ namespace OpenRCT2::Ui::Windows std::string GetWindowTitle(WindowBase* w) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { auto& customInfo = GetInfo(static_cast(w)); return customInfo.Desc.Title; @@ -1177,7 +1177,7 @@ namespace OpenRCT2::Ui::Windows void UpdateWindowTitle(WindowBase* w, std::string_view value) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { auto& customInfo = GetInfo(static_cast(w)); customInfo.Desc.Title = value; @@ -1186,7 +1186,7 @@ namespace OpenRCT2::Ui::Windows void UpdateWindowTab(WindowBase* w, int32_t tabIndex) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { auto& customInfo = GetInfo(static_cast(w)); if (tabIndex >= 0 && tabIndex < static_cast(customInfo.Desc.Tabs.size())) @@ -1198,7 +1198,7 @@ namespace OpenRCT2::Ui::Windows void UpdateWidgetText(WindowBase* w, WidgetIndex widgetIndex, std::string_view value) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { auto& customInfo = GetInfo(static_cast(w)); auto customWidgetInfo = customInfo.GetCustomWidgetDesc(w, widgetIndex); @@ -1215,7 +1215,7 @@ namespace OpenRCT2::Ui::Windows void UpdateWidgetItems(WindowBase* w, WidgetIndex widgetIndex, const std::vector& items) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { auto& customInfo = GetInfo(static_cast(w)); auto customWidgetInfo = customInfo.GetCustomWidgetDesc(w, widgetIndex); @@ -1229,7 +1229,7 @@ namespace OpenRCT2::Ui::Windows void UpdateWidgetColour(WindowBase* w, WidgetIndex widgetIndex, colour_t colour) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { auto& customInfo = GetInfo(static_cast(w)); auto customWidgetInfo = customInfo.GetCustomWidgetDesc(w, widgetIndex); @@ -1258,7 +1258,7 @@ namespace OpenRCT2::Ui::Windows void UpdateWidgetSelectedIndex(WindowBase* w, WidgetIndex widgetIndex, int32_t selectedIndex) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { auto& customInfo = GetInfo(static_cast(w)); auto customWidgetInfo = customInfo.GetCustomWidgetDesc(w, widgetIndex); @@ -1306,7 +1306,7 @@ namespace OpenRCT2::Ui::Windows std::vector GetWidgetItems(WindowBase* w, WidgetIndex widgetIndex) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { auto& customInfo = GetInfo(static_cast(w)); auto customWidgetInfo = customInfo.GetCustomWidgetDesc(w, widgetIndex); @@ -1320,7 +1320,7 @@ namespace OpenRCT2::Ui::Windows colour_t GetWidgetColour(WindowBase* w, WidgetIndex widgetIndex) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { auto& customInfo = GetInfo(static_cast(w)); auto customWidgetInfo = customInfo.GetCustomWidgetDesc(w, widgetIndex); @@ -1334,7 +1334,7 @@ namespace OpenRCT2::Ui::Windows int32_t GetWidgetSelectedIndex(WindowBase* w, WidgetIndex widgetIndex) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { auto& customInfo = GetInfo(static_cast(w)); auto customWidgetInfo = customInfo.GetCustomWidgetDesc(w, widgetIndex); @@ -1350,7 +1350,7 @@ namespace OpenRCT2::Ui::Windows { for (const auto& w : gWindowList) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { const auto& customInfo = GetInfo(static_cast(w.get())); if (customInfo.Desc.Classification == classification) @@ -1364,7 +1364,7 @@ namespace OpenRCT2::Ui::Windows std::optional FindWidgetIndexByName(WindowBase* w, std::string_view name) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { auto& customInfo = GetInfo(static_cast(w)); for (size_t i = 0; i < customInfo.Widgets.size(); i++) @@ -1384,7 +1384,7 @@ namespace OpenRCT2::Ui::Windows std::string GetWidgetName(WindowBase* w, WidgetIndex widgetIndex) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { const auto& customInfo = GetInfo(static_cast(w)); auto customWidgetInfo = customInfo.GetCustomWidgetDesc(w, widgetIndex); @@ -1398,7 +1398,7 @@ namespace OpenRCT2::Ui::Windows void SetWidgetName(WindowBase* w, WidgetIndex widgetIndex, std::string_view name) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { auto& customInfo = GetInfo(static_cast(w)); auto customWidgetInfo = customInfo.GetCustomWidgetDesc(w, widgetIndex); @@ -1411,7 +1411,7 @@ namespace OpenRCT2::Ui::Windows std::string GetWidgetTooltip(WindowBase* w, WidgetIndex widgetIndex) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { const auto& customInfo = GetInfo(static_cast(w)); auto customWidgetInfo = customInfo.GetCustomWidgetDesc(w, widgetIndex); @@ -1425,7 +1425,7 @@ namespace OpenRCT2::Ui::Windows void SetWidgetTooltip(WindowBase* w, WidgetIndex widgetIndex, std::string_view tooltip) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { auto& customInfo = GetInfo(static_cast(w)); auto customWidgetInfo = customInfo.GetCustomWidgetDesc(w, widgetIndex); @@ -1438,7 +1438,7 @@ namespace OpenRCT2::Ui::Windows CustomListView* GetCustomListView(WindowBase* w, WidgetIndex widgetIndex) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { auto& info = GetInfo(static_cast(w)); auto scrollIndex = WindowGetScrollDataIndex(*w, widgetIndex); @@ -1452,7 +1452,7 @@ namespace OpenRCT2::Ui::Windows int32_t GetWidgetMaxLength(WindowBase* w, WidgetIndex widgetIndex) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { auto& customInfo = GetInfo(static_cast(w)); auto customWidgetInfo = customInfo.GetCustomWidgetDesc(w, widgetIndex); @@ -1466,7 +1466,7 @@ namespace OpenRCT2::Ui::Windows void SetWidgetMaxLength(WindowBase* w, WidgetIndex widgetIndex, int32_t value) { - if (w->classification == WindowClass::Custom) + if (w->classification == WindowClass::custom) { auto& customInfo = GetInfo(static_cast(w)); auto customWidgetInfo = customInfo.GetCustomWidgetDesc(w, widgetIndex); @@ -1483,7 +1483,7 @@ namespace OpenRCT2::Ui::Windows std::vector customWindows; for (const auto& window : gWindowList) { - if (window->classification == WindowClass::Custom) + if (window->classification == WindowClass::custom) { auto customWindow = reinterpret_cast(window.get()); auto& customInfo = GetInfo(customWindow); diff --git a/src/openrct2-ui/scripting/ScUi.hpp b/src/openrct2-ui/scripting/ScUi.hpp index 6138fe7600..1d9cb20cb9 100644 --- a/src/openrct2-ui/scripting/ScUi.hpp +++ b/src/openrct2-ui/scripting/ScUi.hpp @@ -145,7 +145,7 @@ namespace OpenRCT2::Scripting std::shared_ptr mainViewport_get() const { - return std::make_shared(WindowClass::MainWindow); + return std::make_shared(WindowClass::mainWindow); } std::shared_ptr tileSelection_get() const @@ -189,7 +189,7 @@ namespace OpenRCT2::Scripting { auto* windowMgr = Ui::GetWindowManager(); auto cls = GetClassification(classification); - if (cls != WindowClass::Null) + if (cls != WindowClass::null) { if (id.type() == DukValue::Type::NUMBER) { @@ -400,7 +400,7 @@ namespace OpenRCT2::Scripting private: WindowClass GetClassification(const std::string& key) const { - return WindowClass::Null; + return WindowClass::null; } DukValue GetScenarioFile(std::string_view path) diff --git a/src/openrct2-ui/scripting/ScViewport.hpp b/src/openrct2-ui/scripting/ScViewport.hpp index a734aa31cc..89a8580e22 100644 --- a/src/openrct2-ui/scripting/ScViewport.hpp +++ b/src/openrct2-ui/scripting/ScViewport.hpp @@ -249,7 +249,7 @@ namespace OpenRCT2::Scripting private: WindowBase* GetWindow() const { - if (_class == WindowClass::MainWindow) + if (_class == WindowClass::mainWindow) return WindowGetMain(); auto* windowMgr = Ui::GetWindowManager(); diff --git a/src/openrct2-ui/scripting/ScWidget.hpp b/src/openrct2-ui/scripting/ScWidget.hpp index ac2b94e395..5b8dc2f6f2 100644 --- a/src/openrct2-ui/scripting/ScWidget.hpp +++ b/src/openrct2-ui/scripting/ScWidget.hpp @@ -393,7 +393,7 @@ namespace OpenRCT2::Scripting protected: WindowBase* GetWindow() const { - if (_class == WindowClass::MainWindow) + if (_class == WindowClass::mainWindow) return WindowGetMain(); auto* windowMgr = Ui::GetWindowManager(); @@ -415,7 +415,7 @@ namespace OpenRCT2::Scripting auto w = GetWindow(); if (w != nullptr) { - return w->classification == WindowClass::Custom; + return w->classification == WindowClass::custom; } return false; } diff --git a/src/openrct2-ui/scripting/ScWindow.hpp b/src/openrct2-ui/scripting/ScWindow.hpp index 229925d222..8d11943e71 100644 --- a/src/openrct2-ui/scripting/ScWindow.hpp +++ b/src/openrct2-ui/scripting/ScWindow.hpp @@ -269,7 +269,7 @@ namespace OpenRCT2::Scripting std::string title_get() const { auto w = GetWindow(); - if (w != nullptr && w->classification == WindowClass::Custom) + if (w != nullptr && w->classification == WindowClass::custom) { return GetWindowTitle(w); } @@ -278,7 +278,7 @@ namespace OpenRCT2::Scripting void title_set(std::string value) { auto w = GetWindow(); - if (w != nullptr && w->classification == WindowClass::Custom) + if (w != nullptr && w->classification == WindowClass::custom) { UpdateWindowTitle(w, value); } @@ -287,7 +287,7 @@ namespace OpenRCT2::Scripting int32_t tabIndex_get() const { auto w = GetWindow(); - if (w != nullptr && w->classification == WindowClass::Custom) + if (w != nullptr && w->classification == WindowClass::custom) { return w->page; } @@ -296,7 +296,7 @@ namespace OpenRCT2::Scripting void tabIndex_set(int32_t tab) { auto w = GetWindow(); - if (w != nullptr && w->classification == WindowClass::Custom) + if (w != nullptr && w->classification == WindowClass::custom) { UpdateWindowTab(w, tab); } diff --git a/src/openrct2-ui/title/TitleSequencePlayer.cpp b/src/openrct2-ui/title/TitleSequencePlayer.cpp index 8adc254952..47867a9a09 100644 --- a/src/openrct2-ui/title/TitleSequencePlayer.cpp +++ b/src/openrct2-ui/title/TitleSequencePlayer.cpp @@ -409,25 +409,25 @@ namespace OpenRCT2::Title void CloseParkSpecificWindows() { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::ConstructRide); - windowMgr->CloseByClass(WindowClass::DemolishRidePrompt); - windowMgr->CloseByClass(WindowClass::EditorInventionListDrag); - windowMgr->CloseByClass(WindowClass::EditorInventionList); - windowMgr->CloseByClass(WindowClass::EditorObjectSelection); - windowMgr->CloseByClass(WindowClass::EditorScenarioOptions); - windowMgr->CloseByClass(WindowClass::Finances); - windowMgr->CloseByClass(WindowClass::FirePrompt); - windowMgr->CloseByClass(WindowClass::GuestList); - windowMgr->CloseByClass(WindowClass::InstallTrack); - windowMgr->CloseByClass(WindowClass::Peep); - windowMgr->CloseByClass(WindowClass::Ride); - windowMgr->CloseByClass(WindowClass::RideConstruction); - windowMgr->CloseByClass(WindowClass::RideList); - windowMgr->CloseByClass(WindowClass::Scenery); - windowMgr->CloseByClass(WindowClass::Staff); - windowMgr->CloseByClass(WindowClass::TrackDeletePrompt); - windowMgr->CloseByClass(WindowClass::TrackDesignList); - windowMgr->CloseByClass(WindowClass::TrackDesignPlace); + windowMgr->CloseByClass(WindowClass::constructRide); + windowMgr->CloseByClass(WindowClass::demolishRidePrompt); + windowMgr->CloseByClass(WindowClass::editorInventionListDrag); + windowMgr->CloseByClass(WindowClass::editorInventionList); + windowMgr->CloseByClass(WindowClass::editorObjectSelection); + windowMgr->CloseByClass(WindowClass::editorScenarioOptions); + windowMgr->CloseByClass(WindowClass::finances); + windowMgr->CloseByClass(WindowClass::firePrompt); + windowMgr->CloseByClass(WindowClass::guestList); + windowMgr->CloseByClass(WindowClass::installTrack); + windowMgr->CloseByClass(WindowClass::peep); + windowMgr->CloseByClass(WindowClass::ride); + windowMgr->CloseByClass(WindowClass::rideConstruction); + windowMgr->CloseByClass(WindowClass::rideList); + windowMgr->CloseByClass(WindowClass::scenery); + windowMgr->CloseByClass(WindowClass::staff); + windowMgr->CloseByClass(WindowClass::trackDeletePrompt); + windowMgr->CloseByClass(WindowClass::trackDesignList); + windowMgr->CloseByClass(WindowClass::trackDesignPlace); } void PrepareParkForPlayback() diff --git a/src/openrct2-ui/windows/About.cpp b/src/openrct2-ui/windows/About.cpp index 1f5e1d2955..c2a69323c1 100644 --- a/src/openrct2-ui/windows/About.cpp +++ b/src/openrct2-ui/windows/About.cpp @@ -133,7 +133,7 @@ namespace OpenRCT2::Ui::Windows OpenRCT2::GetContext()->GetUiContext().OpenURL("https://discord.gg/ZXZd8D8"); break; case WIDX_CHANGELOG: - ContextOpenWindow(WindowClass::Changelog); + ContextOpenWindow(WindowClass::changelog); break; case WIDX_NEW_VERSION: ContextOpenWindowView(WV_NEW_VERSION_INFO); @@ -288,6 +288,6 @@ namespace OpenRCT2::Ui::Windows WindowBase* AboutOpen() { auto* windowMgr = GetWindowManager(); - return windowMgr->FocusOrCreate(WindowClass::About, kWindowSize, WF_CENTRE_SCREEN); + return windowMgr->FocusOrCreate(WindowClass::about, kWindowSize, WF_CENTRE_SCREEN); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/AssetPacks.cpp b/src/openrct2-ui/windows/AssetPacks.cpp index 8f4d4c1cf7..38cb3ad0de 100644 --- a/src/openrct2-ui/windows/AssetPacks.cpp +++ b/src/openrct2-ui/windows/AssetPacks.cpp @@ -343,6 +343,6 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = GetWindowManager(); auto flags = WF_AUTO_POSITION | WF_CENTRE_SCREEN; - return windowMgr->FocusOrCreate(WindowClass::AssetPacks, kWindowSize, flags); + return windowMgr->FocusOrCreate(WindowClass::assetPacks, kWindowSize, flags); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/Banner.cpp b/src/openrct2-ui/windows/Banner.cpp index 91dd76e9ea..5dd9d01809 100644 --- a/src/openrct2-ui/windows/Banner.cpp +++ b/src/openrct2-ui/windows/Banner.cpp @@ -317,12 +317,12 @@ namespace OpenRCT2::Ui::Windows WindowBase* BannerOpen(WindowNumber number) { auto* windowMgr = GetWindowManager(); - auto w = static_cast(windowMgr->BringToFrontByNumber(WindowClass::Banner, number)); + auto w = static_cast(windowMgr->BringToFrontByNumber(WindowClass::banner, number)); if (w != nullptr) return w; - w = windowMgr->Create(WindowClass::Banner, kWindowSize, 0); + w = windowMgr->Create(WindowClass::banner, kWindowSize, 0); if (w != nullptr) w->initialise(number); diff --git a/src/openrct2-ui/windows/Changelog.cpp b/src/openrct2-ui/windows/Changelog.cpp index 06ae48fbe5..44ec784fcf 100644 --- a/src/openrct2-ui/windows/Changelog.cpp +++ b/src/openrct2-ui/windows/Changelog.cpp @@ -280,13 +280,13 @@ namespace OpenRCT2::Ui::Windows WindowBase* ChangelogOpen(int personality) { auto* windowMgr = GetWindowManager(); - auto* window = windowMgr->BringToFrontByClass(WindowClass::Changelog); + auto* window = windowMgr->BringToFrontByClass(WindowClass::changelog); if (window == nullptr) { int32_t width = (ContextGetWidth() * 4) / 5; int32_t height = (ContextGetHeight() * 4) / 5; auto* newWindow = windowMgr->Create( - WindowClass::Changelog, { width, height }, WF_CENTRE_SCREEN | WF_RESIZABLE); + WindowClass::changelog, { width, height }, WF_CENTRE_SCREEN | WF_RESIZABLE); newWindow->SetPersonality(personality); return newWindow; } diff --git a/src/openrct2-ui/windows/Cheats.cpp b/src/openrct2-ui/windows/Cheats.cpp index 10fcaa3a92..b959ee5e55 100644 --- a/src/openrct2-ui/windows/Cheats.cpp +++ b/src/openrct2-ui/windows/Cheats.cpp @@ -913,14 +913,14 @@ static StringId window_cheats_page_titles[] = { auto setDateAction = GameActions::ParkSetDateAction( _yearSpinnerValue - 1, _monthSpinnerValue - 1, _daySpinnerValue - 1); GameActions::Execute(&setDateAction, gameState); - windowMgr->InvalidateByClass(WindowClass::BottomToolbar); + windowMgr->InvalidateByClass(WindowClass::bottomToolbar); break; } case WIDX_DATE_RESET: { auto setDateAction = GameActions::ParkSetDateAction(0, 0, 0); GameActions::Execute(&setDateAction, gameState); - windowMgr->InvalidateByClass(WindowClass::BottomToolbar); + windowMgr->InvalidateByClass(WindowClass::bottomToolbar); invalidateWidget(WIDX_YEAR_BOX); invalidateWidget(WIDX_MONTH_BOX); invalidateWidget(WIDX_DAY_BOX); @@ -1340,10 +1340,10 @@ static StringId window_cheats_page_titles[] = { WindowBase* CheatsOpen() { auto* windowMgr = GetWindowManager(); - auto* window = windowMgr->BringToFrontByClass(WindowClass::Cheats); + auto* window = windowMgr->BringToFrontByClass(WindowClass::cheats); if (window == nullptr) { - window = windowMgr->Create(WindowClass::Cheats, ScreenCoordsXY(32, 32), kWindowSize); + window = windowMgr->Create(WindowClass::cheats, ScreenCoordsXY(32, 32), kWindowSize); } return window; } diff --git a/src/openrct2-ui/windows/ClearScenery.cpp b/src/openrct2-ui/windows/ClearScenery.cpp index 3b36c374f5..12484881c9 100644 --- a/src/openrct2-ui/windows/ClearScenery.cpp +++ b/src/openrct2-ui/windows/ClearScenery.cpp @@ -79,7 +79,7 @@ namespace OpenRCT2::Ui::Windows void onClose() override { - if (isToolActive(WindowClass::ClearScenery, WIDX_BACKGROUND)) + if (isToolActive(WindowClass::clearScenery, WIDX_BACKGROUND)) ToolCancel(); } @@ -157,7 +157,7 @@ namespace OpenRCT2::Ui::Windows { currentFrame++; // Close window if another tool is open - if (!isToolActive(WindowClass::ClearScenery, WIDX_BACKGROUND)) + if (!isToolActive(WindowClass::clearScenery, WIDX_BACKGROUND)) close(); } @@ -295,7 +295,7 @@ namespace OpenRCT2::Ui::Windows { _clearSceneryCost = cost; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::ClearScenery); + windowMgr->InvalidateByClass(WindowClass::clearScenery); } } @@ -331,7 +331,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_BACKGROUND: { auto* windowMgr = GetWindowManager(); - if (windowMgr->FindByClass(WindowClass::Error) == nullptr && (gMapSelectFlags.has(MapSelectFlag::enable))) + if (windowMgr->FindByClass(WindowClass::error) == nullptr && (gMapSelectFlags.has(MapSelectFlag::enable))) { auto action = GetClearAction(); GameActions::Execute(&action, getGameState()); @@ -369,7 +369,7 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); return windowMgr->FocusOrCreate( - WindowClass::ClearScenery, ScreenCoordsXY(ContextGetWidth() - kWindowSize.width, 29), kWindowSize, 0); + WindowClass::clearScenery, ScreenCoordsXY(ContextGetWidth() - kWindowSize.width, 29), kWindowSize, 0); } /** @@ -378,14 +378,14 @@ namespace OpenRCT2::Ui::Windows */ void ToggleClearSceneryWindow() { - if (isToolActive(WindowClass::ClearScenery, WIDX_BACKGROUND)) + if (isToolActive(WindowClass::clearScenery, WIDX_BACKGROUND)) { ToolCancel(); } else { ShowGridlines(); - auto* toolWindow = ContextOpenWindow(WindowClass::ClearScenery); + auto* toolWindow = ContextOpenWindow(WindowClass::clearScenery); ToolSet(*toolWindow, WIDX_BACKGROUND, Tool::bulldozer); gInputFlags.set(InputFlag::unk6); } diff --git a/src/openrct2-ui/windows/CustomCurrency.cpp b/src/openrct2-ui/windows/CustomCurrency.cpp index 125dcea4ea..7005f75988 100644 --- a/src/openrct2-ui/windows/CustomCurrency.cpp +++ b/src/openrct2-ui/windows/CustomCurrency.cpp @@ -223,6 +223,6 @@ namespace OpenRCT2::Ui::Windows WindowBase* CustomCurrencyOpen() { auto* windowMgr = GetWindowManager(); - return windowMgr->FocusOrCreate(WindowClass::CustomCurrencyConfig, kWindowSize, WF_CENTRE_SCREEN); + return windowMgr->FocusOrCreate(WindowClass::customCurrencyConfig, kWindowSize, WF_CENTRE_SCREEN); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/DebugPaint.cpp b/src/openrct2-ui/windows/DebugPaint.cpp index 5b968a77bc..cf4dfa3f41 100644 --- a/src/openrct2-ui/windows/DebugPaint.cpp +++ b/src/openrct2-ui/windows/DebugPaint.cpp @@ -155,7 +155,7 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); auto* window = windowMgr->FocusOrCreate( - WindowClass::DebugPaint, { 16, ContextGetHeight() - 16 - 33 - kWindowSize.height }, kWindowSize, + WindowClass::debugPaint, { 16, ContextGetHeight() - 16 - 33 - kWindowSize.height }, kWindowSize, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_TITLE_BAR); return window; diff --git a/src/openrct2-ui/windows/DemolishRidePrompt.cpp b/src/openrct2-ui/windows/DemolishRidePrompt.cpp index 5123158b07..18324134b9 100644 --- a/src/openrct2-ui/windows/DemolishRidePrompt.cpp +++ b/src/openrct2-ui/windows/DemolishRidePrompt.cpp @@ -95,7 +95,7 @@ namespace OpenRCT2::Ui::Windows WindowBase* RideDemolishPromptOpen(const Ride& ride) { auto* windowMgr = GetWindowManager(); - auto* w = windowMgr->FindByClass(WindowClass::DemolishRidePrompt); + auto* w = windowMgr->FindByClass(WindowClass::demolishRidePrompt); DemolishRidePromptWindow* newWindow; if (w != nullptr) @@ -104,12 +104,12 @@ namespace OpenRCT2::Ui::Windows windowMgr->Close(*w); newWindow = windowMgr->Create( - WindowClass::DemolishRidePrompt, windowPos, kWindowSize, WF_TRANSPARENT); + WindowClass::demolishRidePrompt, windowPos, kWindowSize, WF_TRANSPARENT); } else { newWindow = windowMgr->Create( - WindowClass::DemolishRidePrompt, kWindowSize, WF_CENTRE_SCREEN | WF_TRANSPARENT); + WindowClass::demolishRidePrompt, kWindowSize, WF_CENTRE_SCREEN | WF_TRANSPARENT); } newWindow->SetRide(ride); diff --git a/src/openrct2-ui/windows/Dropdown.cpp b/src/openrct2-ui/windows/Dropdown.cpp index 1518d95820..b54ba2ed06 100644 --- a/src/openrct2-ui/windows/Dropdown.cpp +++ b/src/openrct2-ui/windows/Dropdown.cpp @@ -394,7 +394,7 @@ namespace OpenRCT2::Ui::Windows // Create the window (width/height position are set later) auto* windowMgr = GetWindowManager(); auto* w = windowMgr->Create( - WindowClass::Dropdown, { width, customItemHeight }, WF_STICK_TO_FRONT | WF_NO_TITLE_BAR); + WindowClass::dropdown, { width, customItemHeight }, WF_STICK_TO_FRONT | WF_NO_TITLE_BAR); if (w != nullptr) { auto numRowsPerColumn = prefRowsPerColumn > 0 ? static_cast(prefRowsPerColumn) : Dropdown::kItemsMaxSize; @@ -438,7 +438,7 @@ namespace OpenRCT2::Ui::Windows // Create the window (width/height position are set later) auto* windowMgr = GetWindowManager(); - auto* w = windowMgr->Create(WindowClass::Dropdown, { itemWidth, itemHeight }, WF_STICK_TO_FRONT); + auto* w = windowMgr->Create(WindowClass::dropdown, { itemWidth, itemHeight }, WF_STICK_TO_FRONT); if (w != nullptr) { w->setImageItems({ x, y }, extray, colour, numItems, itemWidth, itemHeight, numColumns); @@ -448,7 +448,7 @@ namespace OpenRCT2::Ui::Windows void WindowDropdownClose() { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::Dropdown); + windowMgr->CloseByClass(WindowClass::dropdown); } /** @@ -457,7 +457,7 @@ namespace OpenRCT2::Ui::Windows */ int32_t DropdownIndexFromPoint(const ScreenCoordsXY& loc, WindowBase* w) { - if (w->classification == WindowClass::Dropdown) + if (w->classification == WindowClass::dropdown) { auto* ddWnd = static_cast(w); return ddWnd->GetIndexFromPoint(loc); diff --git a/src/openrct2-ui/windows/EditorBottomToolbar.cpp b/src/openrct2-ui/windows/EditorBottomToolbar.cpp index c0868ff0f3..29b0d14693 100644 --- a/src/openrct2-ui/windows/EditorBottomToolbar.cpp +++ b/src/openrct2-ui/windows/EditorBottomToolbar.cpp @@ -88,8 +88,8 @@ namespace OpenRCT2::Ui::Windows { ColourSchemeUpdateByClass( this, - gLegacyScene == LegacyScene::scenarioEditor ? WindowClass::EditorScenarioBottomToolbar - : WindowClass::EditorTrackBottomToolbar); + gLegacyScene == LegacyScene::scenarioEditor ? WindowClass::editorScenarioBottomToolbar + : WindowClass::editorTrackBottomToolbar); uint16_t screenWidth = ContextGetWidth(); widgets[WIDX_NEXT_IMAGE].left = screenWidth - 200; @@ -175,7 +175,7 @@ namespace OpenRCT2::Ui::Windows SetAllSceneryItemsInvented(); WindowScenerySetDefaultPlacementConfiguration(); getGameState().editorStep = EditorStep::LandscapeEditor; - ContextOpenWindow(WindowClass::Map); + ContextOpenWindow(WindowClass::map); GfxInvalidateScreen(); } @@ -184,7 +184,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = Ui::GetWindowManager(); windowMgr->CloseAll(); - ContextOpenWindow(WindowClass::EditorInventionList); + ContextOpenWindow(WindowClass::editorInventionList); getGameState().editorStep = EditorStep::InventionsListSetUp; GfxInvalidateScreen(); } @@ -194,7 +194,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = Ui::GetWindowManager(); windowMgr->CloseAll(); - ContextOpenWindow(WindowClass::EditorScenarioOptions); + ContextOpenWindow(WindowClass::editorScenarioOptions); getGameState().editorStep = EditorStep::ObjectiveSelection; GfxInvalidateScreen(); } @@ -204,7 +204,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = Ui::GetWindowManager(); windowMgr->CloseAll(); - ContextOpenWindow(WindowClass::EditorScenarioOptions); + ContextOpenWindow(WindowClass::editorScenarioOptions); getGameState().editorStep = EditorStep::OptionsSelection; GfxInvalidateScreen(); } @@ -215,17 +215,17 @@ namespace OpenRCT2::Ui::Windows return; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::EditorObjectSelection); + windowMgr->CloseByClass(WindowClass::editorObjectSelection); FinishObjectSelection(); if (gLegacyScene == LegacyScene::trackDesigner) { - ContextOpenWindow(WindowClass::ConstructRide); + ContextOpenWindow(WindowClass::constructRide); } else { - ContextOpenWindow(WindowClass::Map); - ContextOpenWindow(WindowClass::Mapgen); + ContextOpenWindow(WindowClass::map); + ContextOpenWindow(WindowClass::mapgen); } } @@ -236,7 +236,7 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = Ui::GetWindowManager(); windowMgr->CloseAll(); - ContextOpenWindow(WindowClass::EditorInventionList); + ContextOpenWindow(WindowClass::editorInventionList); getGameState().editorStep = EditorStep::InventionsListSetUp; } else @@ -252,7 +252,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = Ui::GetWindowManager(); windowMgr->CloseAll(); - ContextOpenWindow(WindowClass::EditorScenarioOptions); + ContextOpenWindow(WindowClass::editorScenarioOptions); getGameState().editorStep = EditorStep::ObjectiveSelection; GfxInvalidateScreen(); } @@ -262,7 +262,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = Ui::GetWindowManager(); windowMgr->CloseAll(); - ContextOpenWindow(WindowClass::EditorScenarioOptions); + ContextOpenWindow(WindowClass::editorScenarioOptions); getGameState().editorStep = EditorStep::OptionsSelection; GfxInvalidateScreen(); } @@ -272,7 +272,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = Ui::GetWindowManager(); windowMgr->CloseAll(); - ContextOpenWindow(WindowClass::EditorScenarioOptions); + ContextOpenWindow(WindowClass::editorScenarioOptions); getGameState().editorStep = EditorStep::ScenarioDetails; GfxInvalidateScreen(); } @@ -311,7 +311,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = Ui::GetWindowManager(); windowMgr->CloseAll(); - auto intent = Intent(WindowClass::Loadsave); + auto intent = Intent(WindowClass::loadsave); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::save); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::scenario); intent.PutExtra(INTENT_EXTRA_PATH, gameState.scenarioOptions.name); @@ -352,7 +352,7 @@ namespace OpenRCT2::Ui::Windows windowPos + ScreenCoordsXY{ widgets[WIDX_PREVIOUS_IMAGE].left + 6, widgets[WIDX_PREVIOUS_IMAGE].top + 6 }); colour_t textColour = colours[1].colour; - if (gHoverWidget.windowClassification == WindowClass::BottomToolbar + if (gHoverWidget.windowClassification == WindowClass::bottomToolbar && gHoverWidget.widgetIndex == WIDX_PREVIOUS_STEP_BUTTON) { textColour = COLOUR_WHITE; @@ -391,7 +391,7 @@ namespace OpenRCT2::Ui::Windows colour_t textColour = colours[1].colour; - if (gHoverWidget.windowClassification == WindowClass::BottomToolbar + if (gHoverWidget.windowClassification == WindowClass::bottomToolbar && gHoverWidget.widgetIndex == WIDX_NEXT_STEP_BUTTON) { textColour = COLOUR_WHITE; @@ -451,7 +451,7 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); auto* window = windowMgr->Create( - WindowClass::BottomToolbar, ScreenCoordsXY(0, ContextGetHeight() - kToolbarHeight), + WindowClass::bottomToolbar, ScreenCoordsXY(0, ContextGetHeight() - kToolbarHeight), { ContextGetWidth(), kToolbarHeight }, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND | WF_NO_TITLE_BAR); return window; diff --git a/src/openrct2-ui/windows/EditorInventionsList.cpp b/src/openrct2-ui/windows/EditorInventionsList.cpp index 5e05c5e534..ebefe7584f 100644 --- a/src/openrct2-ui/windows/EditorInventionsList.cpp +++ b/src/openrct2-ui/windows/EditorInventionsList.cpp @@ -588,7 +588,7 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); return windowMgr->FocusOrCreate( - WindowClass::EditorInventionList, kWindowSize, WF_NO_SCROLLING | WF_RESIZABLE | WF_CENTRE_SCREEN); + WindowClass::editorInventionList, kWindowSize, WF_NO_SCROLLING | WF_RESIZABLE | WF_CENTRE_SCREEN); } #pragma endregion @@ -609,7 +609,7 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); auto* inventionListWindow = static_cast( - windowMgr->FindByClass(WindowClass::EditorInventionList)); + windowMgr->FindByClass(WindowClass::editorInventionList)); if (inventionListWindow != nullptr) { auto res = inventionListWindow->GetResearchItemAt(screenCoords); @@ -628,7 +628,7 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); auto* inventionListWindow = static_cast( - windowMgr->FindByClass(WindowClass::EditorInventionList)); + windowMgr->FindByClass(WindowClass::editorInventionList)); if (inventionListWindow == nullptr) { close(); @@ -648,7 +648,7 @@ namespace OpenRCT2::Ui::Windows inventionListWindow->MoveResearchItem(_draggedItem, res->research, res->isInvented); } - windowMgr->InvalidateByClass(WindowClass::EditorInventionList); + windowMgr->InvalidateByClass(WindowClass::editorInventionList); close(); } @@ -684,9 +684,9 @@ namespace OpenRCT2::Ui::Windows ResearchItem* researchItem, const ScreenCoordsXY& editorPos, int objectSelectionScrollWidth) { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::EditorInventionListDrag); + windowMgr->CloseByClass(WindowClass::editorInventionListDrag); auto* wnd = windowMgr->Create( - WindowClass::EditorInventionListDrag, { 10, 14 }, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_SNAPPING); + WindowClass::editorInventionListDrag, { 10, 14 }, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_SNAPPING); if (wnd != nullptr) { wnd->init(*researchItem, editorPos, objectSelectionScrollWidth); @@ -696,7 +696,7 @@ namespace OpenRCT2::Ui::Windows static const ResearchItem* WindowEditorInventionsListDragGetItem() { auto* windowMgr = GetWindowManager(); - auto* wnd = static_cast(windowMgr->FindByClass(WindowClass::EditorInventionListDrag)); + auto* wnd = static_cast(windowMgr->FindByClass(WindowClass::editorInventionListDrag)); if (wnd == nullptr) { return nullptr; diff --git a/src/openrct2-ui/windows/EditorObjectSelection.cpp b/src/openrct2-ui/windows/EditorObjectSelection.cpp index d301309470..24de747f84 100644 --- a/src/openrct2-ui/windows/EditorObjectSelection.cpp +++ b/src/openrct2-ui/windows/EditorObjectSelection.cpp @@ -379,7 +379,7 @@ namespace OpenRCT2::Ui::Windows return; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::EditorObjectSelection); + windowMgr->CloseByClass(WindowClass::editorObjectSelection); if (isInEditorMode()) { @@ -431,7 +431,7 @@ namespace OpenRCT2::Ui::Windows } invalidate(); - auto intent = Intent(WindowClass::Loadsave); + auto intent = Intent(WindowClass::loadsave); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::load); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::track); ContextOpenIntent(&intent); @@ -602,7 +602,7 @@ namespace OpenRCT2::Ui::Windows // Used for in-game object selection cheat to prevent crashing the game // when windows attempt to draw objects that don't exist any more auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseAllExceptClass(WindowClass::EditorObjectSelection); + windowMgr->CloseAllExceptClass(WindowClass::editorObjectSelection); int32_t selected_object = GetObjectFromObjectSelection(GetSelectedObjectType(), screenCoords.y); if (selected_object == -1) @@ -636,7 +636,7 @@ namespace OpenRCT2::Ui::Windows auto& objManager = GetContext()->GetObjectManager(); objManager.LoadObject(_loadedObject.get()->GetIdentifier()); - windowMgr->ForceClose(WindowClass::EditorObjectSelection); + windowMgr->ForceClose(WindowClass::editorObjectSelection); // This function calls window_track_list_open ManageTracks(); @@ -1615,7 +1615,7 @@ namespace OpenRCT2::Ui::Windows const auto* rideEntry = GetRideEntryByIndex(entry_index); auto rideType = rideEntry->GetFirstNonNullRideType(); - auto intent = Intent(WindowClass::TrackDesignList); + auto intent = Intent(WindowClass::trackDesignList); intent.PutExtra(INTENT_EXTRA_RIDE_TYPE, rideType); intent.PutExtra(INTENT_EXTRA_RIDE_ENTRY_INDEX, entry_index); ContextOpenIntent(&intent); @@ -1630,14 +1630,14 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); return windowMgr->FocusOrCreate( - WindowClass::EditorObjectSelection, kWindowSize, WF_10 | WF_RESIZABLE | WF_CENTRE_SCREEN); + WindowClass::editorObjectSelection, kWindowSize, WF_10 | WF_RESIZABLE | WF_CENTRE_SCREEN); } // Used for forced closure void EditorObjectSelectionClose() { auto* windowMgr = GetWindowManager(); - auto window = windowMgr->FindByClass(WindowClass::EditorObjectSelection); + auto window = windowMgr->FindByClass(WindowClass::editorObjectSelection); if (window == nullptr) { return; @@ -1745,7 +1745,7 @@ namespace OpenRCT2::Ui::Windows ContextShowError(STR_INVALID_SELECTION_OF_OBJECTS, errorString, {}); auto* windowMgr = Ui::GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::EditorObjectSelection); + WindowBase* w = windowMgr->FindByClass(WindowClass::editorObjectSelection); if (w != nullptr) { // Click tab with missing object diff --git a/src/openrct2-ui/windows/EditorParkEntrance.cpp b/src/openrct2-ui/windows/EditorParkEntrance.cpp index 7114edd4b3..2beb8088d8 100644 --- a/src/openrct2-ui/windows/EditorParkEntrance.cpp +++ b/src/openrct2-ui/windows/EditorParkEntrance.cpp @@ -399,11 +399,11 @@ namespace OpenRCT2::Ui::Windows { // Check if window is already open auto* windowMgr = GetWindowManager(); - auto* window = windowMgr->BringToFrontByClass(WindowClass::EditorParkEntrance); + auto* window = windowMgr->BringToFrontByClass(WindowClass::editorParkEntrance); if (window != nullptr) return window; - window = windowMgr->Create(WindowClass::EditorParkEntrance, kWindowSize, WF_10 | WF_RESIZABLE); + window = windowMgr->Create(WindowClass::editorParkEntrance, kWindowSize, WF_10 | WF_RESIZABLE); return window; } diff --git a/src/openrct2-ui/windows/EditorScenarioOptions.cpp b/src/openrct2-ui/windows/EditorScenarioOptions.cpp index ebec013d48..323d33ea26 100644 --- a/src/openrct2-ui/windows/EditorScenarioOptions.cpp +++ b/src/openrct2-ui/windows/EditorScenarioOptions.cpp @@ -1575,8 +1575,8 @@ namespace OpenRCT2::Ui::Windows if (gLegacyScene == LegacyScene::playing) { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::Finances); - windowMgr->InvalidateByClass(WindowClass::BottomToolbar); + windowMgr->InvalidateByClass(WindowClass::finances); + windowMgr->InvalidateByClass(WindowClass::bottomToolbar); } } @@ -2385,6 +2385,6 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); return windowMgr->FocusOrCreate( - WindowClass::EditorScenarioOptions, { 280, 148 }, WF_NO_SCROLLING | WF_CENTRE_SCREEN); + WindowClass::editorScenarioOptions, { 280, 148 }, WF_NO_SCROLLING | WF_CENTRE_SCREEN); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/Error.cpp b/src/openrct2-ui/windows/Error.cpp index c88305e424..4ea518b4aa 100644 --- a/src/openrct2-ui/windows/Error.cpp +++ b/src/openrct2-ui/windows/Error.cpp @@ -123,7 +123,7 @@ namespace OpenRCT2::Ui::Windows // Close any existing error windows if they exist. auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::Error); + windowMgr->CloseByClass(WindowClass::error); // How wide is the error string? int32_t width = GfxGetStringWidthNewLined(buffer.data(), FontStyle::Medium); @@ -143,7 +143,7 @@ namespace OpenRCT2::Ui::Windows auto errorWindow = std::make_unique(std::move(buffer), numLines, autoClose); return windowMgr->Create( - std::move(errorWindow), WindowClass::Error, windowPosition, { width, height }, + std::move(errorWindow), WindowClass::error, windowPosition, { width, height }, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_TITLE_BAR); } diff --git a/src/openrct2-ui/windows/Finances.cpp b/src/openrct2-ui/windows/Finances.cpp index 1ef116feed..d2666d4b04 100644 --- a/src/openrct2-ui/windows/Finances.cpp +++ b/src/openrct2-ui/windows/Finances.cpp @@ -879,7 +879,7 @@ namespace OpenRCT2::Ui::Windows static FinancesWindow* FinancesWindowOpen(uint8_t page) { auto* windowMgr = Ui::GetWindowManager(); - auto* window = windowMgr->FocusOrCreate(WindowClass::Finances, kWindowSizeSummary, WF_10); + auto* window = windowMgr->FocusOrCreate(WindowClass::finances, kWindowSizeSummary, WF_10); if (window != nullptr && page != WINDOW_FINANCES_PAGE_SUMMARY) window->setPage(page); @@ -890,7 +890,7 @@ namespace OpenRCT2::Ui::Windows WindowBase* FinancesOpen() { auto* windowMgr = Ui::GetWindowManager(); - return windowMgr->FocusOrCreate(WindowClass::Finances, kWindowSizeSummary, WF_10); + return windowMgr->FocusOrCreate(WindowClass::finances, kWindowSizeSummary, WF_10); } WindowBase* FinancesResearchOpen() diff --git a/src/openrct2-ui/windows/Footpath.cpp b/src/openrct2-ui/windows/Footpath.cpp index 630414dba5..a489a0510d 100644 --- a/src/openrct2-ui/windows/Footpath.cpp +++ b/src/openrct2-ui/windows/Footpath.cpp @@ -229,7 +229,7 @@ namespace OpenRCT2::Ui::Windows gMapSelectFlags.unset(MapSelectFlag::enableConstruct); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::TopToolbar); + windowMgr->InvalidateByClass(WindowClass::topToolbar); HideGridlines(); } @@ -248,12 +248,12 @@ namespace OpenRCT2::Ui::Windows // Check tool if (_footpathConstructionMode == PathConstructionMode::land) { - if (!isToolActive(WindowClass::Footpath, WIDX_CONSTRUCT_ON_LAND)) + if (!isToolActive(WindowClass::footpath, WIDX_CONSTRUCT_ON_LAND)) close(); } else if (_footpathConstructionMode == PathConstructionMode::bridgeOrTunnelPick) { - if (!isToolActive(WindowClass::Footpath, WIDX_CONSTRUCT_BRIDGE_OR_TUNNEL)) + if (!isToolActive(WindowClass::footpath, WIDX_CONSTRUCT_BRIDGE_OR_TUNNEL)) close(); } } @@ -1179,7 +1179,7 @@ namespace OpenRCT2::Ui::Windows } auto* windowMgr = GetWindowManager(); - auto* self = static_cast(windowMgr->FindByClass(WindowClass::Footpath)); + auto* self = static_cast(windowMgr->FindByClass(WindowClass::footpath)); if (self == nullptr) { return; @@ -1567,7 +1567,7 @@ namespace OpenRCT2::Ui::Windows } auto* windowMgr = GetWindowManager(); - return windowMgr->FocusOrCreate(WindowClass::Footpath, kWindowSize, 0); + return windowMgr->FocusOrCreate(WindowClass::footpath, kWindowSize, 0); } void WindowFootpathResetSelectedPath() @@ -1578,7 +1578,7 @@ namespace OpenRCT2::Ui::Windows void WindowFootpathKeyboardShortcutTurnLeft() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::Footpath); + WindowBase* w = windowMgr->FindByClass(WindowClass::footpath); if (w != nullptr) { auto* footpathWindow = static_cast(w); @@ -1592,7 +1592,7 @@ namespace OpenRCT2::Ui::Windows void WindowFootpathKeyboardShortcutTurnRight() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::Footpath); + WindowBase* w = windowMgr->FindByClass(WindowClass::footpath); if (w != nullptr) { auto* footpathWindow = static_cast(w); @@ -1606,7 +1606,7 @@ namespace OpenRCT2::Ui::Windows void WindowFootpathKeyboardShortcutSlopeDown() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::Footpath); + WindowBase* w = windowMgr->FindByClass(WindowClass::footpath); if (w != nullptr) { auto* footpathWindow = static_cast(w); @@ -1620,7 +1620,7 @@ namespace OpenRCT2::Ui::Windows void WindowFootpathKeyboardShortcutSlopeUp() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::Footpath); + WindowBase* w = windowMgr->FindByClass(WindowClass::footpath); if (w != nullptr) { auto* footpathWindow = static_cast(w); @@ -1634,7 +1634,7 @@ namespace OpenRCT2::Ui::Windows void WindowFootpathKeyboardShortcutDemolishCurrent() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::Footpath); + WindowBase* w = windowMgr->FindByClass(WindowClass::footpath); if (w != nullptr) { auto* footpathWindow = static_cast(w); @@ -1648,7 +1648,7 @@ namespace OpenRCT2::Ui::Windows void WindowFootpathKeyboardShortcutBuildCurrent() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::Footpath); + WindowBase* w = windowMgr->FindByClass(WindowClass::footpath); if (w != nullptr) { auto* footpathWindow = static_cast(w); @@ -1666,14 +1666,14 @@ namespace OpenRCT2::Ui::Windows void ToggleFootpathWindow() { auto* windowMgr = GetWindowManager(); - if (windowMgr->FindByClass(WindowClass::Footpath) == nullptr) + if (windowMgr->FindByClass(WindowClass::footpath) == nullptr) { - ContextOpenWindow(WindowClass::Footpath); + ContextOpenWindow(WindowClass::footpath); } else { ToolCancel(); - windowMgr->CloseByClass(WindowClass::Footpath); + windowMgr->CloseByClass(WindowClass::footpath); } } @@ -1713,7 +1713,7 @@ namespace OpenRCT2::Ui::Windows } } - if (!isToolActive(WindowClass::Scenery)) + if (!isToolActive(WindowClass::scenery)) { if (res.Error != GameActions::Status::Ok) { diff --git a/src/openrct2-ui/windows/GameBottomToolbar.cpp b/src/openrct2-ui/windows/GameBottomToolbar.cpp index c5410d4e01..0868565203 100644 --- a/src/openrct2-ui/windows/GameBottomToolbar.cpp +++ b/src/openrct2-ui/windows/GameBottomToolbar.cpp @@ -80,7 +80,7 @@ namespace OpenRCT2::Ui::Windows colour_t GetHoverWidgetColour(WidgetIndex index) { return ( - gHoverWidget.windowClassification == WindowClass::BottomToolbar && gHoverWidget.widgetIndex == index + gHoverWidget.windowClassification == WindowClass::bottomToolbar && gHoverWidget.widgetIndex == index ? static_cast(COLOUR_WHITE) : colours[0].colour); } @@ -433,7 +433,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_LEFT_OUTSET: case WIDX_MONEY: if (!(getGameState().park.flags & PARK_FLAGS_NO_MONEY)) - ContextOpenWindow(WindowClass::Finances); + ContextOpenWindow(WindowClass::finances); break; case WIDX_GUESTS: ContextOpenWindowView(WV_PARK_GUESTS); @@ -444,7 +444,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_MIDDLE_INSET: if (News::IsQueueEmpty()) { - ContextOpenWindow(WindowClass::RecentNews); + ContextOpenWindow(WindowClass::recentNews); } else { @@ -474,7 +474,7 @@ namespace OpenRCT2::Ui::Windows break; case WIDX_RIGHT_OUTSET: case WIDX_DATE: - ContextOpenWindow(WindowClass::RecentNews); + ContextOpenWindow(WindowClass::recentNews); break; } } @@ -692,7 +692,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = GetWindowManager(); auto* window = windowMgr->Create( - WindowClass::BottomToolbar, ScreenCoordsXY(0, screenHeight - toolbarHeight), { screenWidth, toolbarHeight }, + WindowClass::bottomToolbar, ScreenCoordsXY(0, screenHeight - toolbarHeight), { screenWidth, toolbarHeight }, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND | WF_NO_TITLE_BAR); return window; @@ -703,7 +703,7 @@ namespace OpenRCT2::Ui::Windows if (gLegacyScene == LegacyScene::playing) { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateWidgetByClass(WindowClass::BottomToolbar, WIDX_MIDDLE_OUTSET); + windowMgr->InvalidateWidgetByClass(WindowClass::bottomToolbar, WIDX_MIDDLE_OUTSET); } } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 7601297909..dc4f8a4b37 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -661,7 +661,7 @@ namespace OpenRCT2::Ui::Windows if (result->Error != GameActions::Status::Ok) return; auto* windowMgr = GetWindowManager(); - WindowBase* wind = windowMgr->FindByNumber(WindowClass::Peep, peepnum); + WindowBase* wind = windowMgr->FindByNumber(WindowClass::peep, peepnum); if (wind != nullptr) { ToolSet(*wind, WC_PEEP__WIDX_PICKUP, Tool::picker); @@ -1291,7 +1291,7 @@ namespace OpenRCT2::Ui::Windows if (index >= static_cast(_riddenRides.size())) return; - auto intent = Intent(WindowClass::Ride); + auto intent = Intent(WindowClass::ride); intent.PutExtra(INTENT_EXTRA_RIDE_ID, _riddenRides[index]); ContextOpenIntent(&intent); } @@ -1917,14 +1917,14 @@ namespace OpenRCT2::Ui::Windows } auto* windowMgr = GetWindowManager(); - auto* window = static_cast(windowMgr->BringToFrontByNumber(WindowClass::Peep, peep->Id.ToUnderlying())); + auto* window = static_cast(windowMgr->BringToFrontByNumber(WindowClass::peep, peep->Id.ToUnderlying())); if (window == nullptr) { auto windowSize = kWindowSize; if (Config::Get().general.DebuggingTools) windowSize.width += kTabWidth; - window = windowMgr->Create(WindowClass::Peep, windowSize, WF_RESIZABLE); + window = windowMgr->Create(WindowClass::peep, windowSize, WF_RESIZABLE); if (window == nullptr) { return nullptr; diff --git a/src/openrct2-ui/windows/GuestList.cpp b/src/openrct2-ui/windows/GuestList.cpp index 5ee56ad0e4..a87009ef9f 100644 --- a/src/openrct2-ui/windows/GuestList.cpp +++ b/src/openrct2-ui/windows/GuestList.cpp @@ -268,7 +268,7 @@ namespace OpenRCT2::Ui::Windows close(); break; case WIDX_MAP: - ContextOpenWindow(WindowClass::Map); + ContextOpenWindow(WindowClass::map); break; case WIDX_TRACKING: _trackingOnly = !_trackingOnly; @@ -948,10 +948,10 @@ namespace OpenRCT2::Ui::Windows WindowBase* GuestListOpen() { auto* windowMgr = GetWindowManager(); - auto* window = windowMgr->BringToFrontByClass(WindowClass::GuestList); + auto* window = windowMgr->BringToFrontByClass(WindowClass::guestList); if (window == nullptr) { - window = windowMgr->Create(WindowClass::GuestList, kWindowSize, WF_10 | WF_RESIZABLE); + window = windowMgr->Create(WindowClass::guestList, kWindowSize, WF_10 | WF_RESIZABLE); } return window; } @@ -972,7 +972,7 @@ namespace OpenRCT2::Ui::Windows void WindowGuestListRefreshList() { auto* windowMgr = GetWindowManager(); - auto* w = windowMgr->FindByClass(WindowClass::GuestList); + auto* w = windowMgr->FindByClass(WindowClass::guestList); if (w != nullptr) { static_cast(w)->RefreshList(); diff --git a/src/openrct2-ui/windows/InstallTrack.cpp b/src/openrct2-ui/windows/InstallTrack.cpp index cf69c2c104..0312cd4657 100644 --- a/src/openrct2-ui/windows/InstallTrack.cpp +++ b/src/openrct2-ui/windows/InstallTrack.cpp @@ -416,14 +416,14 @@ namespace OpenRCT2::Ui::Windows } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->ForceClose(WindowClass::EditorObjectSelection); + windowMgr->ForceClose(WindowClass::editorObjectSelection); windowMgr->CloseConstructionWindows(); gTrackDesignSceneryToggle = false; _currentTrackPieceDirection = 2; auto* window = windowMgr->FocusOrCreate( - WindowClass::InstallTrack, kWindowSize, WF_AUTO_POSITION | WF_CENTRE_SCREEN); + WindowClass::installTrack, kWindowSize, WF_AUTO_POSITION | WF_CENTRE_SCREEN); window->setupTrack(path, std::move(trackDesign)); return window; diff --git a/src/openrct2-ui/windows/Land.cpp b/src/openrct2-ui/windows/Land.cpp index 4eabe0e055..957bc812b2 100644 --- a/src/openrct2-ui/windows/Land.cpp +++ b/src/openrct2-ui/windows/Land.cpp @@ -106,7 +106,7 @@ namespace OpenRCT2::Ui::Windows void onClose() override { // If the tool wasn't changed, turn tool off - if (isToolActive(WindowClass::Land, WIDX_BACKGROUND)) + if (isToolActive(WindowClass::land, WIDX_BACKGROUND)) ToolCancel(); } @@ -230,7 +230,7 @@ namespace OpenRCT2::Ui::Windows void onUpdate() override { - if (!isToolActive(WindowClass::Land, WIDX_BACKGROUND)) + if (!isToolActive(WindowClass::land, WIDX_BACKGROUND)) close(); } @@ -623,7 +623,7 @@ namespace OpenRCT2::Ui::Windows { _landToolRaiseCost = raise_cost; _landToolLowerCost = lower_cost; - windowMgr->InvalidateByClass(WindowClass::Land); + windowMgr->InvalidateByClass(WindowClass::land); } return; } @@ -650,7 +650,7 @@ namespace OpenRCT2::Ui::Windows { _landToolRaiseCost = raise_cost; _landToolLowerCost = lower_cost; - windowMgr->InvalidateByClass(WindowClass::Land); + windowMgr->InvalidateByClass(WindowClass::land); } return; } @@ -711,7 +711,7 @@ namespace OpenRCT2::Ui::Windows { _landToolRaiseCost = raise_cost; _landToolLowerCost = lower_cost; - windowMgr->InvalidateByClass(WindowClass::Land); + windowMgr->InvalidateByClass(WindowClass::land); } return; } @@ -728,7 +728,7 @@ namespace OpenRCT2::Ui::Windows { _landToolRaiseCost = raise_cost; _landToolLowerCost = lower_cost; - windowMgr->InvalidateByClass(WindowClass::Land); + windowMgr->InvalidateByClass(WindowClass::land); } return; } @@ -838,7 +838,7 @@ namespace OpenRCT2::Ui::Windows { _landToolRaiseCost = raise_cost; _landToolLowerCost = lower_cost; - windowMgr->InvalidateByClass(WindowClass::Land); + windowMgr->InvalidateByClass(WindowClass::land); } } @@ -876,7 +876,7 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); return windowMgr->FocusOrCreate( - WindowClass::Land, ScreenCoordsXY(ContextGetWidth() - kWindowSize.width, 29), kWindowSize, 0); + WindowClass::land, ScreenCoordsXY(ContextGetWidth() - kWindowSize.width, 29), kWindowSize, 0); } /** @@ -885,14 +885,14 @@ namespace OpenRCT2::Ui::Windows */ void ToggleLandWindow() { - if (isToolActive(WindowClass::Land, WIDX_BACKGROUND)) + if (isToolActive(WindowClass::land, WIDX_BACKGROUND)) { ToolCancel(); } else { ShowGridlines(); - auto* toolWindow = ContextOpenWindow(WindowClass::Land); + auto* toolWindow = ContextOpenWindow(WindowClass::land); ToolSet(*toolWindow, WIDX_BACKGROUND, Tool::digDown); gInputFlags.set(InputFlag::unk6); } diff --git a/src/openrct2-ui/windows/LandRights.cpp b/src/openrct2-ui/windows/LandRights.cpp index 4791023f5d..c5dd69576c 100644 --- a/src/openrct2-ui/windows/LandRights.cpp +++ b/src/openrct2-ui/windows/LandRights.cpp @@ -154,7 +154,7 @@ namespace OpenRCT2::Ui::Windows HideGridlines(); HideConstructionRights(); - if (isToolActive(WindowClass::LandRights)) + if (isToolActive(WindowClass::landRights)) ToolCancel(); } @@ -253,7 +253,7 @@ namespace OpenRCT2::Ui::Windows currentFrame++; // Close window if another tool is open - if (!isToolActive(WindowClass::LandRights)) + if (!isToolActive(WindowClass::landRights)) { close(); return; @@ -371,12 +371,12 @@ namespace OpenRCT2::Ui::Windows if (IsOwnershipMode()) { PrepareDrawSandbox(); - ColourSchemeUpdateByClass(this, WindowClass::Map); + ColourSchemeUpdateByClass(this, WindowClass::map); } else { PrepareDrawInGame(); - ColourSchemeUpdateByClass(this, WindowClass::LandRights); + ColourSchemeUpdateByClass(this, WindowClass::landRights); } } @@ -471,7 +471,7 @@ namespace OpenRCT2::Ui::Windows _landRightsCost = kMoney64Undefined; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::LandRights); + windowMgr->InvalidateByClass(WindowClass::landRights); } return; } @@ -595,6 +595,6 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); return windowMgr->FocusOrCreate( - WindowClass::LandRights, ScreenCoordsXY(ContextGetWidth() - kWindowSize.width, 29), kWindowSize, 0); + WindowClass::landRights, ScreenCoordsXY(ContextGetWidth() - kWindowSize.width, 29), kWindowSize, 0); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/LoadSave.cpp b/src/openrct2-ui/windows/LoadSave.cpp index da980abda4..8b05e93c17 100644 --- a/src/openrct2-ui/windows/LoadSave.cpp +++ b/src/openrct2-ui/windows/LoadSave.cpp @@ -382,7 +382,7 @@ namespace OpenRCT2::Ui::Windows }, [](const ParkPreview preview) { auto* windowMgr = GetContext()->GetUiContext().GetWindowManager(); - auto* wnd = windowMgr->FindByClass(WindowClass::Loadsave); + auto* wnd = windowMgr->FindByClass(WindowClass::loadsave); if (wnd == nullptr) { return; @@ -589,7 +589,7 @@ namespace OpenRCT2::Ui::Windows _listItems.clear(); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::LoadsaveOverwritePrompt); + windowMgr->CloseByClass(WindowClass::loadsaveOverwritePrompt); Config::Save(); @@ -1164,7 +1164,7 @@ namespace OpenRCT2::Ui::Windows RegisterCallback(callback); auto* windowMgr = GetWindowManager(); - auto* w = static_cast(windowMgr->BringToFrontByClass(WindowClass::Loadsave)); + auto* w = static_cast(windowMgr->BringToFrontByClass(WindowClass::loadsave)); if (w == nullptr) { auto& config = Config::Get().general; @@ -1179,7 +1179,7 @@ namespace OpenRCT2::Ui::Windows ScreenSize windowSize = { config.FileBrowserWidth, config.FileBrowserHeight }; w = windowMgr->Create( - WindowClass::Loadsave, windowSize, WF_STICK_TO_FRONT | WF_RESIZABLE | WF_AUTO_POSITION | WF_CENTRE_SCREEN, + WindowClass::loadsave, windowSize, WF_STICK_TO_FRONT | WF_RESIZABLE | WF_AUTO_POSITION | WF_CENTRE_SCREEN, action, type); } @@ -1201,7 +1201,7 @@ namespace OpenRCT2::Ui::Windows void WindowLoadSaveInputKey(WindowBase* w, uint32_t keycode) { - if (w->classification != WindowClass::Loadsave) + if (w->classification != WindowClass::loadsave) { return; } diff --git a/src/openrct2-ui/windows/Main.cpp b/src/openrct2-ui/windows/Main.cpp index ed38978a41..568309ab2c 100644 --- a/src/openrct2-ui/windows/Main.cpp +++ b/src/openrct2-ui/windows/Main.cpp @@ -78,6 +78,6 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); return windowMgr->Create( - WindowClass::MainWindow, { 0, 0 }, { ContextGetWidth(), ContextGetHeight() }, WF_STICK_TO_BACK | WF_NO_TITLE_BAR); + WindowClass::mainWindow, { 0, 0 }, { ContextGetWidth(), ContextGetHeight() }, WF_STICK_TO_BACK | WF_NO_TITLE_BAR); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/Map.cpp b/src/openrct2-ui/windows/Map.cpp index da3479c630..ea27e11502 100644 --- a/src/openrct2-ui/windows/Map.cpp +++ b/src/openrct2-ui/windows/Map.cpp @@ -282,18 +282,18 @@ namespace OpenRCT2::Ui::Windows break; case WIDX_SET_LAND_RIGHTS: { - if (!windowMgr->FindByClass(WindowClass::LandRights)) - ContextOpenWindow(WindowClass::LandRights); + if (!windowMgr->FindByClass(WindowClass::landRights)) + ContextOpenWindow(WindowClass::landRights); else - windowMgr->CloseByClass(WindowClass::LandRights); + windowMgr->CloseByClass(WindowClass::landRights); break; } case WIDX_BUILD_PARK_ENTRANCE: { - if (!windowMgr->FindByClass(WindowClass::EditorParkEntrance)) - ContextOpenWindow(WindowClass::EditorParkEntrance); + if (!windowMgr->FindByClass(WindowClass::editorParkEntrance)) + ContextOpenWindow(WindowClass::editorParkEntrance); else - windowMgr->CloseByClass(WindowClass::EditorParkEntrance); + windowMgr->CloseByClass(WindowClass::editorParkEntrance); break; } case WIDX_PEOPLE_STARTING_POSITION: @@ -312,7 +312,7 @@ namespace OpenRCT2::Ui::Windows _mapWidthAndHeightLinked = !_mapWidthAndHeightLinked; break; case WIDX_MAP_GENERATOR: - ContextOpenWindow(WindowClass::Mapgen); + ContextOpenWindow(WindowClass::mapgen); break; default: if (widgetIndex >= WIDX_PEOPLE_TAB && widgetIndex <= WIDX_RIDES_TAB) @@ -364,12 +364,12 @@ namespace OpenRCT2::Ui::Windows // Handle guest map flashing _flashingFlags &= ~MapFlashingFlags::FlashGuests; - if (windowMgr->FindByClass(WindowClass::GuestList) != nullptr) + if (windowMgr->FindByClass(WindowClass::guestList) != nullptr) _flashingFlags |= MapFlashingFlags::FlashGuests; // Handle staff map flashing _flashingFlags &= ~MapFlashingFlags::FlashStaff; - if (windowMgr->FindByClass(WindowClass::StaffList) != nullptr) + if (windowMgr->FindByClass(WindowClass::staffList) != nullptr) _flashingFlags |= MapFlashingFlags::FlashStaff; if (GetCurrentRotation() != _rotation) @@ -603,13 +603,13 @@ namespace OpenRCT2::Ui::Windows setWidgetPressed(WIDX_MAP_SIZE_LINK, _mapWidthAndHeightLinked); pressedWidgets |= (1uLL << (WIDX_PEOPLE_TAB + selectedTab)); - if (windowMgr->FindByClass(WindowClass::EditorParkEntrance)) + if (windowMgr->FindByClass(WindowClass::editorParkEntrance)) pressedWidgets |= (1uLL << WIDX_BUILD_PARK_ENTRANCE); - if (windowMgr->FindByClass(WindowClass::LandRights)) + if (windowMgr->FindByClass(WindowClass::landRights)) pressedWidgets |= (1uLL << WIDX_SET_LAND_RIGHTS); - if (windowMgr->FindByClass(WindowClass::Mapgen)) + if (windowMgr->FindByClass(WindowClass::mapgen)) pressedWidgets |= (1uLL << WIDX_MAP_GENERATOR); // Set disabled widgets @@ -1251,7 +1251,7 @@ namespace OpenRCT2::Ui::Windows try { auto* windowMgr = GetWindowManager(); - auto* w = windowMgr->FocusOrCreate(WindowClass::Map, kWindowSize, WF_10); + auto* w = windowMgr->FocusOrCreate(WindowClass::map, kWindowSize, WF_10); w->selectedTab = 0; w->listInformationType = 0; return w; @@ -1266,7 +1266,7 @@ namespace OpenRCT2::Ui::Windows { // Check if window is even opened auto* windowMgr = GetWindowManager(); - auto* w = windowMgr->BringToFrontByClass(WindowClass::Map); + auto* w = windowMgr->BringToFrontByClass(WindowClass::map); if (w == nullptr) { return; diff --git a/src/openrct2-ui/windows/MapGen.cpp b/src/openrct2-ui/windows/MapGen.cpp index 5902b62ac8..becef83ef2 100644 --- a/src/openrct2-ui/windows/MapGen.cpp +++ b/src/openrct2-ui/windows/MapGen.cpp @@ -931,7 +931,7 @@ namespace OpenRCT2::Ui::Windows // Page widgets case WIDX_HEIGHTMAP_BROWSE: { - auto intent = Intent(WindowClass::Loadsave); + auto intent = Intent(WindowClass::loadsave); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::load); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::heightmap); intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(HeightmapLoadsaveCallback)); @@ -1534,7 +1534,7 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); return windowMgr->FocusOrCreate( - WindowClass::Mapgen, kWindowSize, WF_10 | WF_AUTO_POSITION | WF_CENTRE_SCREEN); + WindowClass::mapgen, kWindowSize, WF_10 | WF_AUTO_POSITION | WF_CENTRE_SCREEN); } static void HeightmapLoadsaveCallback(ModalResult result, const utf8* path) diff --git a/src/openrct2-ui/windows/MapTooltip.cpp b/src/openrct2-ui/windows/MapTooltip.cpp index d9521411be..abb80f73e8 100644 --- a/src/openrct2-ui/windows/MapTooltip.cpp +++ b/src/openrct2-ui/windows/MapTooltip.cpp @@ -76,7 +76,7 @@ namespace OpenRCT2::Ui::Windows { // The map tooltip is drawn by the bottom toolbar auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::BottomToolbar); + windowMgr->InvalidateByClass(WindowClass::bottomToolbar); return; } @@ -99,10 +99,10 @@ namespace OpenRCT2::Ui::Windows auto& im = GetInputManager(); auto* wm = GetWindowManager(); if (_cursorHoldDuration < 25 || stringId == kStringIdNone || im.IsModifierKeyPressed(ModifierKey::ctrl) - || im.IsModifierKeyPressed(ModifierKey::shift) || wm->FindByClass(WindowClass::Error) != nullptr) + || im.IsModifierKeyPressed(ModifierKey::shift) || wm->FindByClass(WindowClass::error) != nullptr) { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::MapTooltip); + windowMgr->CloseByClass(WindowClass::mapTooltip); } else { @@ -118,7 +118,7 @@ namespace OpenRCT2::Ui::Windows auto pos = state->position + ScreenCoordsXY{ -width / 2, 15 }; auto* windowMgr = GetWindowManager(); - if (auto w = windowMgr->FindByClass(WindowClass::MapTooltip)) + if (auto w = windowMgr->FindByClass(WindowClass::mapTooltip)) { w->invalidate(); w->windowPos = pos; @@ -128,7 +128,7 @@ namespace OpenRCT2::Ui::Windows else { w = windowMgr->Create( - WindowClass::MapTooltip, pos, { width, height }, + WindowClass::mapTooltip, pos, { width, height }, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND | WF_NO_TITLE_BAR); } } diff --git a/src/openrct2-ui/windows/MazeConstruction.cpp b/src/openrct2-ui/windows/MazeConstruction.cpp index bdc097f2cb..f7c8133c7d 100644 --- a/src/openrct2-ui/windows/MazeConstruction.cpp +++ b/src/openrct2-ui/windows/MazeConstruction.cpp @@ -139,7 +139,7 @@ namespace OpenRCT2::Ui::Windows } else { - auto intent = Intent(WindowClass::Ride); + auto intent = Intent(WindowClass::ride); intent.PutExtra(INTENT_EXTRA_RIDE_ID, currentRide->id.ToUnderlying()); ContextOpenIntent(&intent); } @@ -247,7 +247,7 @@ namespace OpenRCT2::Ui::Windows case RideConstructionState::Front: case RideConstructionState::Back: case RideConstructionState::Selected: - if (isToolActive(WindowClass::RideConstruction)) + if (isToolActive(WindowClass::rideConstruction)) { ToolCancel(); } @@ -377,13 +377,13 @@ namespace OpenRCT2::Ui::Windows ToolCancel(); if (!currentRide->getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) { - windowMgr->CloseByClass(WindowClass::RideConstruction); + windowMgr->CloseByClass(WindowClass::rideConstruction); } } else { gRideEntranceExitPlaceType = gRideEntranceExitPlaceType ^ 1; - windowMgr->InvalidateByClass(WindowClass::RideConstruction); + windowMgr->InvalidateByClass(WindowClass::rideConstruction); auto newToolWidgetIndex = (gRideEntranceExitPlaceType == ENTRANCE_TYPE_RIDE_ENTRANCE) ? WIDX_MAZE_ENTRANCE : WIDX_MAZE_EXIT; @@ -446,13 +446,13 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); return windowMgr->FocusOrCreate( - WindowClass::RideConstruction, ScreenCoordsXY(0, 29), kWindowSize, WF_NO_AUTO_CLOSE); + WindowClass::rideConstruction, ScreenCoordsXY(0, 29), kWindowSize, WF_NO_AUTO_CLOSE); } void WindowMazeConstructionUpdatePressedWidgets() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w == nullptr) return; @@ -468,7 +468,7 @@ namespace OpenRCT2::Ui::Windows switch (_rideConstructionState) { case RideConstructionState::EntranceExit: - if (isToolActive(WindowClass::RideConstruction, WIDX_MAZE_ENTRANCE)) + if (isToolActive(WindowClass::rideConstruction, WIDX_MAZE_ENTRANCE)) { newPressedWidgets |= EnumToFlag(WIDX_MAZE_ENTRANCE); } diff --git a/src/openrct2-ui/windows/Multiplayer.cpp b/src/openrct2-ui/windows/Multiplayer.cpp index 3bb21208ff..ad5faf1cbe 100644 --- a/src/openrct2-ui/windows/Multiplayer.cpp +++ b/src/openrct2-ui/windows/Multiplayer.cpp @@ -915,11 +915,11 @@ namespace OpenRCT2::Ui::Windows { // Check if window is already open auto* windowMgr = GetWindowManager(); - auto* window = windowMgr->BringToFrontByClass(WindowClass::Multiplayer); + auto* window = windowMgr->BringToFrontByClass(WindowClass::multiplayer); if (window == nullptr) { window = windowMgr->Create( - WindowClass::Multiplayer, { 320, 144 }, WF_10 | WF_RESIZABLE | WF_AUTO_POSITION); + WindowClass::multiplayer, { 320, 144 }, WF_10 | WF_RESIZABLE | WF_AUTO_POSITION); } return window; diff --git a/src/openrct2-ui/windows/NetworkStatus.cpp b/src/openrct2-ui/windows/NetworkStatus.cpp index 71ec7fdbfe..51a8a9d7b5 100644 --- a/src/openrct2-ui/windows/NetworkStatus.cpp +++ b/src/openrct2-ui/windows/NetworkStatus.cpp @@ -124,19 +124,19 @@ namespace OpenRCT2::Ui::Windows WindowBase* NetworkStatusOpen(const std::string& text, CloseCallback onClose) { - ContextForceCloseWindowByClass(WindowClass::ProgressWindow); + ContextForceCloseWindowByClass(WindowClass::progressWindow); auto* windowMgr = GetWindowManager(); NetworkStatusWindow* window; - if ((window = static_cast(windowMgr->FindByClass(WindowClass::NetworkStatus))) != nullptr) + if ((window = static_cast(windowMgr->FindByClass(WindowClass::networkStatus))) != nullptr) { windowMgr->BringToFront(*window); } else { window = windowMgr->Create( - WindowClass::NetworkStatus, kWindowSize, WF_10 | WF_TRANSPARENT | WF_CENTRE_SCREEN | WF_STICK_TO_FRONT); + WindowClass::networkStatus, kWindowSize, WF_10 | WF_TRANSPARENT | WF_CENTRE_SCREEN | WF_STICK_TO_FRONT); } window->setCloseCallBack(onClose); @@ -148,7 +148,7 @@ namespace OpenRCT2::Ui::Windows void WindowNetworkStatusClose() { auto* windowMgr = GetWindowManager(); - auto window = windowMgr->FindByClass(WindowClass::NetworkStatus); + auto window = windowMgr->FindByClass(WindowClass::networkStatus); if (window == nullptr) { return; @@ -160,11 +160,11 @@ namespace OpenRCT2::Ui::Windows WindowBase* NetworkStatusOpenPassword() { - ContextForceCloseWindowByClass(WindowClass::ProgressWindow); + ContextForceCloseWindowByClass(WindowClass::progressWindow); auto* windowMgr = GetWindowManager(); auto* window = windowMgr->FocusOrCreate( - WindowClass::NetworkStatus, kWindowSize, WF_10 | WF_TRANSPARENT | WF_CENTRE_SCREEN); + WindowClass::networkStatus, kWindowSize, WF_10 | WF_TRANSPARENT | WF_CENTRE_SCREEN); char password[33]{}; WindowTextInputRawOpen(window, WIDX_PASSWORD, STR_PASSWORD_REQUIRED, STR_PASSWORD_REQUIRED_DESC, {}, password, 32); diff --git a/src/openrct2-ui/windows/NewCampaign.cpp b/src/openrct2-ui/windows/NewCampaign.cpp index 6b09645a6c..0d7cede249 100644 --- a/src/openrct2-ui/windows/NewCampaign.cpp +++ b/src/openrct2-ui/windows/NewCampaign.cpp @@ -272,7 +272,7 @@ namespace OpenRCT2::Ui::Windows if (result->Error == GameActions::Status::Ok) { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::NewCampaign); + windowMgr->CloseByClass(WindowClass::newCampaign); } }); GameActions::Execute(&gameAction, getGameState()); @@ -391,7 +391,7 @@ namespace OpenRCT2::Ui::Windows WindowBase* NewCampaignOpen(int16_t campaignType) { auto* windowMgr = GetWindowManager(); - auto* w = static_cast(windowMgr->BringToFrontByClass(WindowClass::NewCampaign)); + auto* w = static_cast(windowMgr->BringToFrontByClass(WindowClass::newCampaign)); if (w != nullptr) { if (w->getCampaignType() == campaignType) @@ -400,7 +400,7 @@ namespace OpenRCT2::Ui::Windows w->close(); } - w = windowMgr->Create(WindowClass::NewCampaign, kWindowSize, 0); + w = windowMgr->Create(WindowClass::newCampaign, kWindowSize, 0); if (w != nullptr) { w->setCampaign(campaignType); @@ -411,7 +411,7 @@ namespace OpenRCT2::Ui::Windows void WindowCampaignRefreshRides() { auto* windowMgr = GetWindowManager(); - auto w = static_cast(windowMgr->FindByClass(WindowClass::NewCampaign)); + auto w = static_cast(windowMgr->FindByClass(WindowClass::newCampaign)); if (w != nullptr) { w->refreshRides(); diff --git a/src/openrct2-ui/windows/NewRide.cpp b/src/openrct2-ui/windows/NewRide.cpp index 20ad0321cd..ade307abf0 100644 --- a/src/openrct2-ui/windows/NewRide.cpp +++ b/src/openrct2-ui/windows/NewRide.cpp @@ -575,7 +575,7 @@ namespace OpenRCT2::Ui::Windows auto count = GetNumTrackDesigns(item); if (count > 0) { - auto intent = Intent(WindowClass::TrackDesignList); + auto intent = Intent(WindowClass::trackDesignList); intent.PutExtra(INTENT_EXTRA_RIDE_TYPE, item.Type); intent.PutExtra(INTENT_EXTRA_RIDE_ENTRY_INDEX, item.EntryIndex); ContextOpenIntent(&intent); @@ -1070,16 +1070,16 @@ namespace OpenRCT2::Ui::Windows WindowBase* NewRideOpen() { auto* windowMgr = Ui::GetWindowManager(); - auto* window = windowMgr->BringToFrontByClass(WindowClass::ConstructRide); + auto* window = windowMgr->BringToFrontByClass(WindowClass::constructRide); if (window) { return window; } - windowMgr->CloseByClass(WindowClass::TrackDesignList); - windowMgr->CloseByClass(WindowClass::TrackDesignPlace); + windowMgr->CloseByClass(WindowClass::trackDesignList); + windowMgr->CloseByClass(WindowClass::trackDesignPlace); - window = windowMgr->Create(WindowClass::ConstructRide, kWindowSize, WF_10 | WF_AUTO_POSITION); + window = windowMgr->Create(WindowClass::constructRide, kWindowSize, WF_10 | WF_AUTO_POSITION); return window; } @@ -1097,7 +1097,7 @@ namespace OpenRCT2::Ui::Windows void WindowNewRideFocus(RideSelection rideItem) { auto* windowMgr = GetWindowManager(); - auto w = static_cast(windowMgr->FindByClass(WindowClass::ConstructRide)); + auto w = static_cast(windowMgr->FindByClass(WindowClass::constructRide)); if (!w) { return; diff --git a/src/openrct2-ui/windows/News.cpp b/src/openrct2-ui/windows/News.cpp index 0ec326ebb1..1a58bb14ef 100644 --- a/src/openrct2-ui/windows/News.cpp +++ b/src/openrct2-ui/windows/News.cpp @@ -580,6 +580,6 @@ namespace OpenRCT2::Ui::Windows WindowBase* NewsOpen() { auto* windowMgr = GetWindowManager(); - return windowMgr->FocusOrCreate(WindowClass::RecentNews, kWindowSize, 0); + return windowMgr->FocusOrCreate(WindowClass::recentNews, kWindowSize, 0); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/ObjectLoadError.cpp b/src/openrct2-ui/windows/ObjectLoadError.cpp index 28f4181ca9..830cc442f0 100644 --- a/src/openrct2-ui/windows/ObjectLoadError.cpp +++ b/src/openrct2-ui/windows/ObjectLoadError.cpp @@ -116,7 +116,7 @@ namespace OpenRCT2::Ui::Windows if (_downloadStatusInfo == DownloadStatusInfo()) { - ContextForceCloseWindowByClass(WindowClass::NetworkStatus); + ContextForceCloseWindowByClass(WindowClass::networkStatus); } else { @@ -140,7 +140,7 @@ namespace OpenRCT2::Ui::Windows str_downloading_objects, sizeof(str_downloading_objects), STR_DOWNLOADING_OBJECTS_FROM, ft.Data()); } - auto intent = Intent(WindowClass::NetworkStatus); + auto intent = Intent(WindowClass::networkStatus); intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string(str_downloading_objects)); intent.PutExtra(INTENT_EXTRA_CALLBACK, []() -> void { _downloadingObjects = false; }); ContextOpenIntent(&intent); @@ -574,10 +574,10 @@ namespace OpenRCT2::Ui::Windows { // Check if window is already open auto* windowMgr = Ui::GetWindowManager(); - auto* window = windowMgr->BringToFrontByClass(WindowClass::ObjectLoadError); + auto* window = windowMgr->BringToFrontByClass(WindowClass::objectLoadError); if (window == nullptr) { - window = windowMgr->Create(WindowClass::ObjectLoadError, kWindowSize, 0); + window = windowMgr->Create(WindowClass::objectLoadError, kWindowSize, 0); } static_cast(window)->initialise(path, numMissingObjects, missingObjects); diff --git a/src/openrct2-ui/windows/Options.cpp b/src/openrct2-ui/windows/Options.cpp index 921f3d8ba1..3335dac9e9 100644 --- a/src/openrct2-ui/windows/Options.cpp +++ b/src/openrct2-ui/windows/Options.cpp @@ -1286,7 +1286,7 @@ namespace OpenRCT2::Ui::Windows if (dropdownIndex == EnumValue(CurrencyType::Custom) + 1) { // Add 1 because the separator occupies a position Config::Get().general.CurrencyFormat = static_cast(dropdownIndex - 1); - ContextOpenWindow(WindowClass::CustomCurrencyConfig); + ContextOpenWindow(WindowClass::customCurrencyConfig); } else { @@ -1406,7 +1406,7 @@ namespace OpenRCT2::Ui::Windows OpenRCT2::Audio::Resume(); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::TopToolbar); + windowMgr->InvalidateByClass(WindowClass::topToolbar); Config::Save(); invalidate(); break; @@ -1662,7 +1662,7 @@ namespace OpenRCT2::Ui::Windows switch (widgetIndex) { case WIDX_HOTKEY_DROPDOWN: - ContextOpenWindow(WindowClass::KeyboardShortcutList); + ContextOpenWindow(WindowClass::keyboardShortcutList); break; case WIDX_SCREEN_EDGE_SCROLLING: Config::Get().general.EdgeScrolling ^= 1; @@ -1746,7 +1746,7 @@ namespace OpenRCT2::Ui::Windows invalidate(); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::TopToolbar); + windowMgr->InvalidateByClass(WindowClass::topToolbar); } void InterfaceMouseUp(WidgetIndex widgetIndex) @@ -1781,7 +1781,7 @@ namespace OpenRCT2::Ui::Windows ToggleToolbarSetting(Config::Get().interface.ToolbarShowRotateAnticlockwise); break; case WIDX_THEMES_BUTTON: - ContextOpenWindow(WindowClass::Themes); + ContextOpenWindow(WindowClass::themes); invalidate(); break; } @@ -1872,7 +1872,7 @@ namespace OpenRCT2::Ui::Windows Config::Get().general.ScenarioUnlockingEnabled ^= 1; Config::Save(); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::ScenarioSelect); + windowMgr->InvalidateByClass(WindowClass::scenarioSelect); break; } case WIDX_AUTO_OPEN_SHOPS: @@ -1988,7 +1988,7 @@ namespace OpenRCT2::Ui::Windows Config::Save(); invalidate(); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::ScenarioSelect); + windowMgr->InvalidateByClass(WindowClass::scenarioSelect); } break; } @@ -2115,7 +2115,7 @@ namespace OpenRCT2::Ui::Windows invalidate(); break; case WIDX_ASSET_PACKS: - ContextOpenWindow(WindowClass::AssetPacks); + ContextOpenWindow(WindowClass::assetPacks); break; #ifdef __EMSCRIPTEN__ case WIDX_EXPORT_EMSCRIPTEN_DATA: @@ -2427,6 +2427,6 @@ namespace OpenRCT2::Ui::Windows WindowBase* OptionsOpen() { auto* windowMgr = GetWindowManager(); - return windowMgr->FocusOrCreate(WindowClass::Options, kWindowSize, WF_CENTRE_SCREEN); + return windowMgr->FocusOrCreate(WindowClass::options, kWindowSize, WF_CENTRE_SCREEN); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/OverwritePrompt.cpp b/src/openrct2-ui/windows/OverwritePrompt.cpp index 777beae40f..6d1bde4169 100644 --- a/src/openrct2-ui/windows/OverwritePrompt.cpp +++ b/src/openrct2-ui/windows/OverwritePrompt.cpp @@ -74,7 +74,7 @@ namespace OpenRCT2::Ui::Windows // As the LoadSaveWindow::Select function can change the order of the // windows we can't use WindowClose(w). auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::LoadsaveOverwritePrompt); + windowMgr->CloseByClass(WindowClass::loadsaveOverwritePrompt); break; } @@ -103,16 +103,16 @@ namespace OpenRCT2::Ui::Windows TrackDesign* trackDesignPtr) { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::LoadsaveOverwritePrompt); + windowMgr->CloseByClass(WindowClass::loadsaveOverwritePrompt); return windowMgr->Create( - WindowClass::LoadsaveOverwritePrompt, kWindowSize, WF_TRANSPARENT | WF_STICK_TO_FRONT | WF_CENTRE_SCREEN, name, + WindowClass::loadsaveOverwritePrompt, kWindowSize, WF_TRANSPARENT | WF_STICK_TO_FRONT | WF_CENTRE_SCREEN, name, path, action, type, trackDesignPtr); } void WindowLoadSaveOverwritePromptInputKey(WindowBase* w, uint32_t keycode) { - if (w->classification != WindowClass::LoadsaveOverwritePrompt) + if (w->classification != WindowClass::loadsaveOverwritePrompt) { return; } diff --git a/src/openrct2-ui/windows/Park.cpp b/src/openrct2-ui/windows/Park.cpp index 5410d264da..f59b738d39 100644 --- a/src/openrct2-ui/windows/Park.cpp +++ b/src/openrct2-ui/windows/Park.cpp @@ -412,7 +412,7 @@ namespace OpenRCT2::Ui::Windows switch (widgetIndex) { case WIDX_BUY_LAND_RIGHTS: - ContextOpenWindow(WindowClass::LandRights); + ContextOpenWindow(WindowClass::landRights); break; case WIDX_LOCATE: scrollToViewport(); @@ -1285,7 +1285,7 @@ namespace OpenRCT2::Ui::Windows static ParkWindow* ParkWindowOpen(uint8_t page) { auto* windowMgr = GetWindowManager(); - auto* wnd = windowMgr->FocusOrCreate(WindowClass::ParkInformation, { 230, 174 + 9 }, WF_10); + auto* wnd = windowMgr->FocusOrCreate(WindowClass::parkInformation, { 230, 174 + 9 }, WF_10); if (wnd != nullptr && page != WINDOW_PARK_PAGE_ENTRANCE) { wnd->onMouseUp(WIDX_TAB_1 + page); diff --git a/src/openrct2-ui/windows/PatrolArea.cpp b/src/openrct2-ui/windows/PatrolArea.cpp index 2f4df7d1aa..42903d400e 100644 --- a/src/openrct2-ui/windows/PatrolArea.cpp +++ b/src/openrct2-ui/windows/PatrolArea.cpp @@ -272,14 +272,14 @@ namespace OpenRCT2::Ui::Windows bool PatrolAreaToolIsActive() { - return isToolActive(WindowClass::PatrolArea); + return isToolActive(WindowClass::patrolArea); } bool IsStaffWindowOpen() { // If staff window for this patrol area was closed, tool is no longer active auto* windowMgr = GetWindowManager(); - auto staffWindow = windowMgr->FindByNumber(WindowClass::Peep, _staffId); + auto staffWindow = windowMgr->FindByNumber(WindowClass::peep, _staffId); return staffWindow != nullptr; } @@ -294,7 +294,7 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); auto* w = windowMgr->FocusOrCreate( - WindowClass::PatrolArea, ScreenCoordsXY(ContextGetWidth() - kWindowSize.width, 29), kWindowSize, 0); + WindowClass::patrolArea, ScreenCoordsXY(ContextGetWidth() - kWindowSize.width, 29), kWindowSize, 0); if (w != nullptr) { w->setStaffId(staffId); @@ -305,7 +305,7 @@ namespace OpenRCT2::Ui::Windows EntityId WindowPatrolAreaGetCurrentStaffId() { auto* windowMgr = GetWindowManager(); - auto current = reinterpret_cast(windowMgr->FindByClass(WindowClass::PatrolArea)); + auto current = reinterpret_cast(windowMgr->FindByClass(WindowClass::patrolArea)); return current != nullptr ? current->GetStaffId() : EntityId::GetNull(); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/Player.cpp b/src/openrct2-ui/windows/Player.cpp index 6616d69421..5386e84af6 100644 --- a/src/openrct2-ui/windows/Player.cpp +++ b/src/openrct2-ui/windows/Player.cpp @@ -630,10 +630,10 @@ namespace OpenRCT2::Ui::Windows WindowBase* PlayerOpen(uint8_t id) { auto* windowMgr = GetWindowManager(); - auto* window = static_cast(windowMgr->BringToFrontByNumber(WindowClass::Player, id)); + auto* window = static_cast(windowMgr->BringToFrontByNumber(WindowClass::player, id)); if (window == nullptr) { - window = windowMgr->Create(WindowClass::Player, { 240, 170 }, WF_RESIZABLE); + window = windowMgr->Create(WindowClass::player, { 240, 170 }, WF_RESIZABLE); } window->init(id); diff --git a/src/openrct2-ui/windows/ProgressWindow.cpp b/src/openrct2-ui/windows/ProgressWindow.cpp index 804b7b945e..17ff7c4436 100644 --- a/src/openrct2-ui/windows/ProgressWindow.cpp +++ b/src/openrct2-ui/windows/ProgressWindow.cpp @@ -234,19 +234,19 @@ namespace OpenRCT2::Ui::Windows WindowBase* ProgressWindowOpen(const std::string& text, CloseCallback onClose) { - ContextForceCloseWindowByClass(WindowClass::NetworkStatus); + ContextForceCloseWindowByClass(WindowClass::networkStatus); auto* windowMgr = GetWindowManager(); ProgressWindow* window; - if ((window = static_cast(windowMgr->FindByClass(WindowClass::ProgressWindow))) != nullptr) + if ((window = static_cast(windowMgr->FindByClass(WindowClass::progressWindow))) != nullptr) { windowMgr->BringToFront(*window); } else { window = windowMgr->Create( - WindowClass::ProgressWindow, kWindowSize, WF_10 | WF_TRANSPARENT | WF_CENTRE_SCREEN | WF_STICK_TO_FRONT); + WindowClass::progressWindow, kWindowSize, WF_10 | WF_TRANSPARENT | WF_CENTRE_SCREEN | WF_STICK_TO_FRONT); } window->setCaption(text); @@ -257,7 +257,7 @@ namespace OpenRCT2::Ui::Windows void ProgressWindowSet(uint32_t currentProgress, uint32_t totalCount, StringId format) { auto* windowMgr = GetWindowManager(); - auto window = windowMgr->FindByClass(WindowClass::ProgressWindow); + auto window = windowMgr->FindByClass(WindowClass::progressWindow); if (window == nullptr) { return; @@ -270,7 +270,7 @@ namespace OpenRCT2::Ui::Windows void ProgressWindowClose() { auto* windowMgr = GetWindowManager(); - auto window = windowMgr->FindByClass(WindowClass::ProgressWindow); + auto window = windowMgr->FindByClass(WindowClass::progressWindow); if (window == nullptr) { return; diff --git a/src/openrct2-ui/windows/RefurbishRidePrompt.cpp b/src/openrct2-ui/windows/RefurbishRidePrompt.cpp index 0124ac1268..39353b6362 100644 --- a/src/openrct2-ui/windows/RefurbishRidePrompt.cpp +++ b/src/openrct2-ui/windows/RefurbishRidePrompt.cpp @@ -96,19 +96,19 @@ namespace OpenRCT2::Ui::Windows RefurbishRidePromptWindow* newWindow; auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::DemolishRidePrompt); + WindowBase* w = windowMgr->FindByClass(WindowClass::demolishRidePrompt); if (w != nullptr) { auto windowPos = w->windowPos; windowMgr->Close(*w); newWindow = windowMgr->Create( - WindowClass::DemolishRidePrompt, windowPos, kWindowSize, WF_TRANSPARENT); + WindowClass::demolishRidePrompt, windowPos, kWindowSize, WF_TRANSPARENT); } else { newWindow = windowMgr->Create( - WindowClass::DemolishRidePrompt, kWindowSize, WF_CENTRE_SCREEN | WF_TRANSPARENT); + WindowClass::demolishRidePrompt, kWindowSize, WF_CENTRE_SCREEN | WF_TRANSPARENT); } newWindow->SetRide(ride); diff --git a/src/openrct2-ui/windows/Research.cpp b/src/openrct2-ui/windows/Research.cpp index f74acb527d..94acf79701 100644 --- a/src/openrct2-ui/windows/Research.cpp +++ b/src/openrct2-ui/windows/Research.cpp @@ -296,7 +296,7 @@ namespace OpenRCT2::Ui::Windows WindowBase* ResearchOpen() { auto* windowMgr = GetWindowManager(); - auto* window = windowMgr->FocusOrCreate(WindowClass::Research, kWindowSizeDevelopment, WF_10); + auto* window = windowMgr->FocusOrCreate(WindowClass::research, kWindowSizeDevelopment, WF_10); window->setPage(WINDOW_RESEARCH_PAGE_DEVELOPMENT); return window; } diff --git a/src/openrct2-ui/windows/Ride.cpp b/src/openrct2-ui/windows/Ride.cpp index f510115570..dbdd9adfc0 100644 --- a/src/openrct2-ui/windows/Ride.cpp +++ b/src/openrct2-ui/windows/Ride.cpp @@ -1138,10 +1138,10 @@ namespace OpenRCT2::Ui::Windows if (newPage == WINDOW_RIDE_PAGE_VEHICLE) { auto* windowMgr = GetWindowManager(); - auto constructionWindow = windowMgr->FindByClass(WindowClass::RideConstruction); + auto constructionWindow = windowMgr->FindByClass(WindowClass::rideConstruction); if (constructionWindow != nullptr && constructionWindow->number == number) { - windowMgr->CloseByClass(WindowClass::RideConstruction); + windowMgr->CloseByClass(WindowClass::rideConstruction); // Closing the construction window sets the tab to the first page, which we don't want here, // as user just clicked the Vehicle page setPage(WINDOW_RIDE_PAGE_VEHICLE); @@ -1633,7 +1633,7 @@ namespace OpenRCT2::Ui::Windows { RideConstructionStart(*ride); auto* windowMgr = GetWindowManager(); - if (windowMgr->FindByNumber(WindowClass::RideConstruction, ride->id.ToUnderlying()) != nullptr) + if (windowMgr->FindByNumber(WindowClass::rideConstruction, ride->id.ToUnderlying()) != nullptr) { close(); return; @@ -3729,7 +3729,7 @@ namespace OpenRCT2::Ui::Windows ContextShowError(STR_UNABLE_TO_LOCATE_MECHANIC, kStringIdNone, {}); else { - auto intent = Intent(WindowClass::Peep); + auto intent = Intent(WindowClass::peep); intent.PutExtra(INTENT_EXTRA_PEEP, mechanic); ContextOpenIntent(&intent); } @@ -3924,7 +3924,7 @@ namespace OpenRCT2::Ui::Windows ride->lifecycleFlags &= ~(RIDE_LIFECYCLE_BREAKDOWN_PENDING | RIDE_LIFECYCLE_BROKEN_DOWN); auto* windowMgr = GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Ride, number); + windowMgr->InvalidateByNumber(WindowClass::ride, number); break; } if (ride->lifecycleFlags @@ -5400,7 +5400,7 @@ namespace OpenRCT2::Ui::Windows } auto trackName = ride->getName(); - auto intent = Intent(WindowClass::Loadsave); + auto intent = Intent(WindowClass::loadsave); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::save); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::track); intent.PutExtra(INTENT_EXTRA_TRACK_DESIGN, _trackDesign.get()); @@ -6732,7 +6732,7 @@ namespace OpenRCT2::Ui::Windows break; case WIDX_SHOW_GUESTS_THOUGHTS: { - auto intent = Intent(WindowClass::GuestList); + auto intent = Intent(WindowClass::guestList); intent.PutExtra( INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::guestsThinkingAboutRide)); intent.PutExtra(INTENT_EXTRA_RIDE_ID, number); @@ -6741,7 +6741,7 @@ namespace OpenRCT2::Ui::Windows } case WIDX_SHOW_GUESTS_ON_RIDE: { - auto intent = Intent(WindowClass::GuestList); + auto intent = Intent(WindowClass::guestList); intent.PutExtra(INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::guestsOnRide)); intent.PutExtra(INTENT_EXTRA_RIDE_ID, number); ContextOpenIntent(&intent); @@ -6749,7 +6749,7 @@ namespace OpenRCT2::Ui::Windows } case WIDX_SHOW_GUESTS_QUEUING: { - auto intent = Intent(WindowClass::GuestList); + auto intent = Intent(WindowClass::guestList); intent.PutExtra(INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::guestsInQueue)); intent.PutExtra(INTENT_EXTRA_RIDE_ID, number); ContextOpenIntent(&intent); @@ -6940,7 +6940,7 @@ namespace OpenRCT2::Ui::Windows static RideWindow* WindowRideOpen(const Ride& ride) { auto* windowMgr = GetWindowManager(); - return windowMgr->Create(WindowClass::Ride, kWindowSize, WF_10 | WF_RESIZABLE, ride); + return windowMgr->Create(WindowClass::ride, kWindowSize, WF_10 | WF_RESIZABLE, ride); } /** @@ -6955,7 +6955,7 @@ namespace OpenRCT2::Ui::Windows } auto* windowMgr = GetWindowManager(); - RideWindow* w = static_cast(windowMgr->BringToFrontByNumber(WindowClass::Ride, ride.id.ToUnderlying())); + RideWindow* w = static_cast(windowMgr->BringToFrontByNumber(WindowClass::ride, ride.id.ToUnderlying())); if (w == nullptr) { w = WindowRideOpen(ride); @@ -6993,7 +6993,7 @@ namespace OpenRCT2::Ui::Windows return RideMainOpen(ride); auto* windowMgr = GetWindowManager(); - auto* w = static_cast(windowMgr->BringToFrontByNumber(WindowClass::Ride, ride.id.ToUnderlying())); + auto* w = static_cast(windowMgr->BringToFrontByNumber(WindowClass::ride, ride.id.ToUnderlying())); if (w == nullptr) { w = WindowRideOpen(ride); @@ -7084,7 +7084,7 @@ namespace OpenRCT2::Ui::Windows } auto* windowMgr = GetWindowManager(); - auto* w = static_cast(windowMgr->FindByNumber(WindowClass::Ride, ride->id.ToUnderlying())); + auto* w = static_cast(windowMgr->FindByNumber(WindowClass::ride, ride->id.ToUnderlying())); if (w != nullptr) { w->invalidate(); @@ -7106,10 +7106,10 @@ namespace OpenRCT2::Ui::Windows numPeepsLeft--; - WindowBase* w2 = windowMgr->FindByNumber(WindowClass::Peep, vehicle->peep[i]); + WindowBase* w2 = windowMgr->FindByNumber(WindowClass::peep, vehicle->peep[i]); if (w2 == nullptr) { - auto intent = Intent(WindowClass::Peep); + auto intent = Intent(WindowClass::peep); intent.PutExtra(INTENT_EXTRA_PEEP, peep); ContextOpenIntent(&intent); openedPeepWindow = 1; @@ -7120,8 +7120,8 @@ namespace OpenRCT2::Ui::Windows } w = static_cast( - openedPeepWindow ? windowMgr->FindByNumber(WindowClass::Ride, ride->id.ToUnderlying()) - : windowMgr->BringToFrontByNumber(WindowClass::Ride, ride->id.ToUnderlying())); + openedPeepWindow ? windowMgr->FindByNumber(WindowClass::ride, ride->id.ToUnderlying()) + : windowMgr->BringToFrontByNumber(WindowClass::ride, ride->id.ToUnderlying())); } if (w == nullptr) @@ -7138,7 +7138,7 @@ namespace OpenRCT2::Ui::Windows void WindowRideInvalidateVehicle(const Vehicle& vehicle) { auto* windowMgr = GetWindowManager(); - auto* w = static_cast(windowMgr->FindByNumber(WindowClass::Ride, vehicle.ride.ToUnderlying())); + auto* w = static_cast(windowMgr->FindByNumber(WindowClass::ride, vehicle.ride.ToUnderlying())); if (w == nullptr) return; @@ -7156,7 +7156,7 @@ namespace OpenRCT2::Ui::Windows void WindowRidePaintResetVehicle(RideId rideIndex) { auto* windowMgr = GetWindowManager(); - auto w = static_cast(windowMgr->FindByNumber(WindowClass::Ride, rideIndex.ToUnderlying())); + auto w = static_cast(windowMgr->FindByNumber(WindowClass::ride, rideIndex.ToUnderlying())); if (w != nullptr) { if (w->page == 4) // WINDOW_RIDE_PAGE_COLOUR diff --git a/src/openrct2-ui/windows/RideConstruction.cpp b/src/openrct2-ui/windows/RideConstruction.cpp index d84bd77138..94d912ed0b 100644 --- a/src/openrct2-ui/windows/RideConstruction.cpp +++ b/src/openrct2-ui/windows/RideConstruction.cpp @@ -218,7 +218,7 @@ namespace OpenRCT2::Ui::Windows static void CloseRideWindowForConstruction(RideId rideId) { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByNumber(WindowClass::Ride, rideId.ToUnderlying()); + WindowBase* w = windowMgr->FindByNumber(WindowClass::ride, rideId.ToUnderlying()); if (w != nullptr && w->page == 1) windowMgr->Close(*w); } @@ -325,7 +325,7 @@ namespace OpenRCT2::Ui::Windows } currentRide->setToDefaultInspectionInterval(); - auto intent = Intent(WindowClass::Ride); + auto intent = Intent(WindowClass::ride); intent.PutExtra(INTENT_EXTRA_RIDE_ID, currentRide->id.ToUnderlying()); ContextOpenIntent(&intent); } @@ -1068,7 +1068,7 @@ namespace OpenRCT2::Ui::Windows case RideConstructionState::Front: case RideConstructionState::Back: case RideConstructionState::Selected: - if (isToolActive(WindowClass::RideConstruction)) + if (isToolActive(WindowClass::rideConstruction)) { ToolCancel(); } @@ -2282,7 +2282,7 @@ namespace OpenRCT2::Ui::Windows { // If the scenery tool is active, we do not display our tiles as it // will conflict with larger scenery objects selecting tiles - if (isToolActive(WindowClass::Scenery)) + if (isToolActive(WindowClass::scenery)) { return; } @@ -2680,13 +2680,13 @@ namespace OpenRCT2::Ui::Windows ToolCancel(); if (!currentRide->getRideTypeDescriptor().HasFlag(RtdFlag::hasTrack)) { - windowMgr->CloseByClass(WindowClass::RideConstruction); + windowMgr->CloseByClass(WindowClass::rideConstruction); } } else { gRideEntranceExitPlaceType = gRideEntranceExitPlaceType ^ 1; - windowMgr->InvalidateByClass(WindowClass::RideConstruction); + windowMgr->InvalidateByClass(WindowClass::rideConstruction); auto newToolWidgetIndex = (gRideEntranceExitPlaceType == ENTRANCE_TYPE_RIDE_ENTRANCE) ? WC_RIDE_CONSTRUCTION__WIDX_ENTRANCE @@ -2901,10 +2901,10 @@ namespace OpenRCT2::Ui::Windows return ContextOpenWindowView(WV_MAZE_CONSTRUCTION); case RideConstructionWindowContext::Default: return windowMgr->Create( - WindowClass::RideConstruction, ScreenCoordsXY(0, 29), kWindowSize, WF_NO_AUTO_CLOSE); + WindowClass::rideConstruction, ScreenCoordsXY(0, 29), kWindowSize, WF_NO_AUTO_CLOSE); } return windowMgr->Create( - WindowClass::RideConstruction, ScreenCoordsXY(0, 29), kWindowSize, WF_NO_AUTO_CLOSE); + WindowClass::rideConstruction, ScreenCoordsXY(0, 29), kWindowSize, WF_NO_AUTO_CLOSE); } static void CloseConstructWindowOnCompletion(const Ride& ride) @@ -2912,7 +2912,7 @@ namespace OpenRCT2::Ui::Windows if (_rideConstructionState == RideConstructionState::State0) { auto* windowMgr = GetWindowManager(); - auto w = windowMgr->FindByClass(WindowClass::RideConstruction); + auto w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w != nullptr) { if (RideAreAllPossibleEntrancesAndExitsBuilt(ride).Successful) @@ -2930,7 +2930,7 @@ namespace OpenRCT2::Ui::Windows static void WindowRideConstructionDoEntranceExitCheck() { auto* windowMgr = GetWindowManager(); - auto w = windowMgr->FindByClass(WindowClass::RideConstruction); + auto w = windowMgr->FindByClass(WindowClass::rideConstruction); auto ride = GetRide(_currentRideIndex); if (w == nullptr || ride == nullptr) { @@ -2939,7 +2939,7 @@ namespace OpenRCT2::Ui::Windows if (_rideConstructionState == RideConstructionState::State0) { - w = windowMgr->FindByClass(WindowClass::RideConstruction); + w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w != nullptr) { if (!RideAreAllPossibleEntrancesAndExitsBuilt(*ride).Successful) @@ -2992,7 +2992,7 @@ namespace OpenRCT2::Ui::Windows } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::Error); + windowMgr->CloseByClass(WindowClass::error); if (ride != nullptr) CloseConstructWindowOnCompletion(*ride); } @@ -3038,7 +3038,7 @@ namespace OpenRCT2::Ui::Windows } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::Error); + windowMgr->CloseByClass(WindowClass::error); if (ride != nullptr) CloseConstructWindowOnCompletion(*ride); } @@ -3170,7 +3170,7 @@ namespace OpenRCT2::Ui::Windows return; } auto* windowMgr = GetWindowManager(); - auto window = static_cast(windowMgr->FindByClass(WindowClass::RideConstruction)); + auto window = static_cast(windowMgr->FindByClass(WindowClass::rideConstruction)); if (!window) { return; @@ -3400,7 +3400,7 @@ namespace OpenRCT2::Ui::Windows if (rtd.specialType != RtdSpecialType::maze) { auto* windowMgr = GetWindowManager(); - auto window = static_cast(windowMgr->FindByClass(WindowClass::RideConstruction)); + auto window = static_cast(windowMgr->FindByClass(WindowClass::rideConstruction)); if (!window) { return; @@ -3705,7 +3705,7 @@ namespace OpenRCT2::Ui::Windows ContextBroadcastIntent(&intent); auto* windowMgr = GetWindowManager(); - w = windowMgr->FindByClass(WindowClass::RideConstruction); + w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w == nullptr) break; @@ -3738,7 +3738,7 @@ namespace OpenRCT2::Ui::Windows || zAttempts == (numAttempts - 1) || z < 0) { Audio::Play(OpenRCT2::Audio::SoundId::Error, 0, state->position.x); - w = windowMgr->FindByClass(WindowClass::RideConstruction); + w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w != nullptr) { ToolSet(*w, WIDX_CONSTRUCT, Tool::crosshair); @@ -3754,7 +3754,7 @@ namespace OpenRCT2::Ui::Windows } else { - windowMgr->CloseByClass(WindowClass::Error); + windowMgr->CloseByClass(WindowClass::error); OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::PlaceItem, _currentTrackBegin); break; } @@ -3772,7 +3772,7 @@ namespace OpenRCT2::Ui::Windows WindowRideConstructionUpdateActiveElements(); auto* windowMgr = GetWindowManager(); - w = windowMgr->FindByClass(WindowClass::RideConstruction); + w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w == nullptr) break; @@ -3826,7 +3826,7 @@ namespace OpenRCT2::Ui::Windows void WindowRideConstructionKeyboardShortcutTurnLeft() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w == nullptr || widgetIsDisabled(*w, WIDX_STRAIGHT) || w->widgets[WIDX_STRAIGHT].type == WidgetType::empty) { return; @@ -4064,7 +4064,7 @@ namespace OpenRCT2::Ui::Windows void WindowRideConstructionKeyboardShortcutTurnRight() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w == nullptr || widgetIsDisabled(*w, WIDX_STRAIGHT) || w->widgets[WIDX_STRAIGHT].type == WidgetType::empty) { return; @@ -4310,7 +4310,7 @@ namespace OpenRCT2::Ui::Windows void WindowRideConstructionKeyboardShortcutUseTrackDefault() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w == nullptr || widgetIsDisabled(*w, WIDX_STRAIGHT) || w->widgets[WIDX_STRAIGHT].type == WidgetType::empty) { return; @@ -4341,7 +4341,7 @@ namespace OpenRCT2::Ui::Windows void WindowRideConstructionKeyboardShortcutSlopeDown() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w == nullptr || widgetIsDisabled(*w, WIDX_STRAIGHT) || w->widgets[WIDX_STRAIGHT].type == WidgetType::empty) { return; @@ -4442,7 +4442,7 @@ namespace OpenRCT2::Ui::Windows void WindowRideConstructionKeyboardShortcutSlopeUp() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w == nullptr || widgetIsDisabled(*w, WIDX_STRAIGHT) || w->widgets[WIDX_STRAIGHT].type == WidgetType::empty) { return; @@ -4543,7 +4543,7 @@ namespace OpenRCT2::Ui::Windows void WindowRideConstructionKeyboardShortcutChainLiftToggle() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w == nullptr || widgetIsDisabled(*w, WIDX_CHAIN_LIFT) || w->widgets[WIDX_CHAIN_LIFT].type == WidgetType::empty) { return; @@ -4555,7 +4555,7 @@ namespace OpenRCT2::Ui::Windows void WindowRideConstructionKeyboardShortcutBankLeft() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w == nullptr || widgetIsDisabled(*w, WIDX_BANK_STRAIGHT) || w->widgets[WIDX_BANK_STRAIGHT].type == WidgetType::empty) { @@ -4592,7 +4592,7 @@ namespace OpenRCT2::Ui::Windows void WindowRideConstructionKeyboardShortcutBankRight() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w == nullptr || widgetIsDisabled(*w, WIDX_BANK_STRAIGHT) || w->widgets[WIDX_BANK_STRAIGHT].type == WidgetType::empty) { @@ -4629,7 +4629,7 @@ namespace OpenRCT2::Ui::Windows void WindowRideConstructionKeyboardShortcutPreviousTrack() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w == nullptr || widgetIsDisabled(*w, WIDX_PREVIOUS_SECTION) || w->widgets[WIDX_PREVIOUS_SECTION].type == WidgetType::empty) { @@ -4642,7 +4642,7 @@ namespace OpenRCT2::Ui::Windows void WindowRideConstructionKeyboardShortcutNextTrack() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w == nullptr || widgetIsDisabled(*w, WIDX_NEXT_SECTION) || w->widgets[WIDX_NEXT_SECTION].type == WidgetType::empty) { return; @@ -4654,7 +4654,7 @@ namespace OpenRCT2::Ui::Windows void WindowRideConstructionKeyboardShortcutBuildCurrent() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w == nullptr || widgetIsDisabled(*w, WIDX_CONSTRUCT) || w->widgets[WIDX_CONSTRUCT].type == WidgetType::empty) { return; @@ -4666,7 +4666,7 @@ namespace OpenRCT2::Ui::Windows void WindowRideConstructionKeyboardShortcutDemolishCurrent() { auto* windowMgr = GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w == nullptr || widgetIsDisabled(*w, WIDX_DEMOLISH) || w->widgets[WIDX_DEMOLISH].type == WidgetType::empty) { return; diff --git a/src/openrct2-ui/windows/RideList.cpp b/src/openrct2-ui/windows/RideList.cpp index 45cac623b5..bca4274caf 100644 --- a/src/openrct2-ui/windows/RideList.cpp +++ b/src/openrct2-ui/windows/RideList.cpp @@ -467,7 +467,7 @@ namespace OpenRCT2::Ui::Windows } else { - auto intent = Intent(WindowClass::Ride); + auto intent = Intent(WindowClass::ride); intent.PutExtra(INTENT_EXTRA_RIDE_ID, selectedRideId.ToUnderlying()); ContextOpenIntent(&intent); } @@ -1130,11 +1130,11 @@ namespace OpenRCT2::Ui::Windows { // Check if window is already open auto* windowMgr = GetWindowManager(); - auto* window = windowMgr->BringToFrontByClass(WindowClass::RideList); + auto* window = windowMgr->BringToFrontByClass(WindowClass::rideList); if (window == nullptr) { window = windowMgr->Create( - WindowClass::RideList, ScreenCoordsXY(32, 32), kWindowSize, WF_10 | WF_RESIZABLE); + WindowClass::rideList, ScreenCoordsXY(32, 32), kWindowSize, WF_10 | WF_RESIZABLE); } return window; } diff --git a/src/openrct2-ui/windows/SavePrompt.cpp b/src/openrct2-ui/windows/SavePrompt.cpp index bb9afd350c..81e3d832b1 100644 --- a/src/openrct2-ui/windows/SavePrompt.cpp +++ b/src/openrct2-ui/windows/SavePrompt.cpp @@ -109,7 +109,7 @@ namespace OpenRCT2::Ui::Windows } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::TopToolbar); + windowMgr->InvalidateByClass(WindowClass::topToolbar); if (canSave) { @@ -137,7 +137,7 @@ namespace OpenRCT2::Ui::Windows } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::TopToolbar); + windowMgr->InvalidateByClass(WindowClass::topToolbar); } void onMouseUp(WidgetIndex widgetIndex) override @@ -166,7 +166,7 @@ namespace OpenRCT2::Ui::Windows if (isInEditorMode()) { - intent = std::make_unique(WindowClass::Loadsave); + intent = std::make_unique(WindowClass::loadsave); intent->PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::save); intent->PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::landscape); intent->PutExtra(INTENT_EXTRA_PATH, getGameState().scenarioOptions.name); @@ -229,7 +229,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = GetWindowManager(); // Check if window is already open - auto* window = windowMgr->BringToFrontByClass(WindowClass::SavePrompt); + auto* window = windowMgr->BringToFrontByClass(WindowClass::savePrompt); if (window != nullptr) { windowMgr->Close(*window); @@ -249,7 +249,7 @@ namespace OpenRCT2::Ui::Windows auto savePromptWindow = std::make_unique(prompt_mode); return windowMgr->Create( - std::move(savePromptWindow), WindowClass::SavePrompt, {}, windowSize, + std::move(savePromptWindow), WindowClass::savePrompt, {}, windowSize, WF_TRANSPARENT | WF_STICK_TO_FRONT | WF_CENTRE_SCREEN | WF_AUTO_POSITION); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/ScenarioSelect.cpp b/src/openrct2-ui/windows/ScenarioSelect.cpp index 460abbff6c..ce3fc14bc8 100644 --- a/src/openrct2-ui/windows/ScenarioSelect.cpp +++ b/src/openrct2-ui/windows/ScenarioSelect.cpp @@ -226,7 +226,7 @@ namespace OpenRCT2::Ui::Windows }, [](const ParkPreview preview) { auto* windowMgr = GetWindowManager(); - auto* wnd = windowMgr->FindByClass(WindowClass::ScenarioSelect); + auto* wnd = windowMgr->FindByClass(WindowClass::scenarioSelect); if (wnd == nullptr) { return; @@ -860,14 +860,14 @@ namespace OpenRCT2::Ui::Windows WindowBase* ScenarioselectOpen(std::function callback) { auto* windowMgr = GetWindowManager(); - auto* window = static_cast(windowMgr->BringToFrontByClass(WindowClass::ScenarioSelect)); + auto* window = static_cast(windowMgr->BringToFrontByClass(WindowClass::scenarioSelect)); if (window != nullptr) { return window; } window = windowMgr->Create( - WindowClass::ScenarioSelect, {}, kWindowSize, WF_AUTO_POSITION | WF_CENTRE_SCREEN, callback); + WindowClass::scenarioSelect, {}, kWindowSize, WF_AUTO_POSITION | WF_CENTRE_SCREEN, callback); return window; } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/Scenery.cpp b/src/openrct2-ui/windows/Scenery.cpp index f7ca4b3eb5..2e50ed64f8 100644 --- a/src/openrct2-ui/windows/Scenery.cpp +++ b/src/openrct2-ui/windows/Scenery.cpp @@ -260,10 +260,10 @@ namespace OpenRCT2::Ui::Windows if (gWindowSceneryScatterEnabled) { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::SceneryScatter); + windowMgr->CloseByClass(WindowClass::sceneryScatter); } - if (isToolActive(WindowClass::Scenery)) + if (isToolActive(WindowClass::scenery)) ToolCancel(); } @@ -286,14 +286,14 @@ namespace OpenRCT2::Ui::Windows _sceneryPaintEnabled ^= true; gWindowSceneryEyedropperEnabled = false; if (gWindowSceneryScatterEnabled) - windowMgr->CloseByClass(WindowClass::SceneryScatter); + windowMgr->CloseByClass(WindowClass::sceneryScatter); invalidate(); break; case WIDX_SCENERY_EYEDROPPER_BUTTON: _sceneryPaintEnabled = false; gWindowSceneryEyedropperEnabled = !gWindowSceneryEyedropperEnabled; if (gWindowSceneryScatterEnabled) - windowMgr->CloseByClass(WindowClass::SceneryScatter); + windowMgr->CloseByClass(WindowClass::sceneryScatter); SceneryRemoveGhostToolPlacement(); invalidate(); break; @@ -301,7 +301,7 @@ namespace OpenRCT2::Ui::Windows _sceneryPaintEnabled = false; gWindowSceneryEyedropperEnabled = false; if (gWindowSceneryScatterEnabled) - windowMgr->CloseByClass(WindowClass::SceneryScatter); + windowMgr->CloseByClass(WindowClass::sceneryScatter); else if ( Network::GetMode() != Network::Mode::client || Network::CanPerformCommand(Network::GetCurrentPlayerGroupIndex(), -2)) @@ -530,7 +530,7 @@ namespace OpenRCT2::Ui::Windows invalidateWidget(WIDX_FILTER_TEXT_BOX); } - if (!isToolActive(WindowClass::Scenery)) + if (!isToolActive(WindowClass::scenery)) { close(); return; @@ -1094,7 +1094,7 @@ namespace OpenRCT2::Ui::Windows PrepareWidgets(); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::Scenery); + windowMgr->InvalidateByClass(WindowClass::scenery); } int32_t GetRequiredWidth() const @@ -2464,7 +2464,7 @@ namespace OpenRCT2::Ui::Windows Direction* outRotation) { auto* windowMgr = GetWindowManager(); - auto* w = windowMgr->FindByClass(WindowClass::Scenery); + auto* w = windowMgr->FindByClass(WindowClass::scenery); if (w == nullptr) { @@ -2662,7 +2662,7 @@ namespace OpenRCT2::Ui::Windows const ScreenCoordsXY& sourceScreenPos, ObjectEntryIndex sceneryIndex, CoordsXY& gridPos, int32_t* outZ) { auto* windowMgr = GetWindowManager(); - auto* w = windowMgr->FindByClass(WindowClass::Scenery); + auto* w = windowMgr->FindByClass(WindowClass::scenery); if (w == nullptr) { @@ -2696,7 +2696,7 @@ namespace OpenRCT2::Ui::Windows const ScreenCoordsXY& sourceScreenPos, ObjectEntryIndex sceneryIndex, CoordsXY& gridPos, uint8_t* outEdges) { auto* windowMgr = GetWindowManager(); - auto* w = windowMgr->FindByClass(WindowClass::Scenery); + auto* w = windowMgr->FindByClass(WindowClass::scenery); if (w == nullptr) { @@ -2787,7 +2787,7 @@ namespace OpenRCT2::Ui::Windows const ScreenCoordsXY& sourceScreenPos, ObjectEntryIndex sceneryIndex, CoordsXY& gridPos, Direction* outDirection) { auto* windowMgr = GetWindowManager(); - auto* w = windowMgr->FindByClass(WindowClass::Scenery); + auto* w = windowMgr->FindByClass(WindowClass::scenery); if (w == nullptr) { @@ -2889,7 +2889,7 @@ namespace OpenRCT2::Ui::Windows Direction* outDirection) { auto* windowMgr = GetWindowManager(); - auto* w = windowMgr->FindByClass(WindowClass::Scenery); + auto* w = windowMgr->FindByClass(WindowClass::scenery); if (w == nullptr) { @@ -3244,10 +3244,10 @@ namespace OpenRCT2::Ui::Windows WindowBase* SceneryOpen() { auto* windowMgr = GetWindowManager(); - auto* w = static_cast(windowMgr->BringToFrontByClass(WindowClass::Scenery)); + auto* w = static_cast(windowMgr->BringToFrontByClass(WindowClass::scenery)); if (w == nullptr) { - w = windowMgr->Create(WindowClass::Scenery); + w = windowMgr->Create(WindowClass::scenery); } return w; } @@ -3257,7 +3257,7 @@ namespace OpenRCT2::Ui::Windows const std::optional tertiary, const std::optional rotation) { auto* windowMgr = GetWindowManager(); - auto* w = static_cast(windowMgr->BringToFrontByClass(WindowClass::Scenery)); + auto* w = static_cast(windowMgr->BringToFrontByClass(WindowClass::scenery)); if (w != nullptr) { w->setSelectedItem(scenery, primary, secondary, tertiary, rotation); @@ -3268,7 +3268,7 @@ namespace OpenRCT2::Ui::Windows { // Should this bring to front? auto* windowMgr = GetWindowManager(); - auto* w = static_cast(windowMgr->FindByClass(WindowClass::Scenery)); + auto* w = static_cast(windowMgr->FindByClass(WindowClass::scenery)); if (w != nullptr) { return w->setSelectedTab(sceneryGroupIndex); @@ -3295,7 +3295,7 @@ namespace OpenRCT2::Ui::Windows const ScenerySelection WindowSceneryGetTabSelection() { auto* windowMgr = GetWindowManager(); - auto* w = static_cast(windowMgr->FindByClass(WindowClass::Scenery)); + auto* w = static_cast(windowMgr->FindByClass(WindowClass::scenery)); if (w != nullptr) { return w->getTabSelection(); @@ -3309,7 +3309,7 @@ namespace OpenRCT2::Ui::Windows void WindowSceneryInit() { auto* windowMgr = GetWindowManager(); - auto* w = static_cast(windowMgr->FindByClass(WindowClass::Scenery)); + auto* w = static_cast(windowMgr->FindByClass(WindowClass::scenery)); if (w != nullptr) { w->init(); @@ -3318,13 +3318,13 @@ namespace OpenRCT2::Ui::Windows void ToggleSceneryWindow() { - if (isToolActive(WindowClass::Scenery, WIDX_SCENERY_BACKGROUND)) + if (isToolActive(WindowClass::scenery, WIDX_SCENERY_BACKGROUND)) { ToolCancel(); } else { - auto* toolWindow = ContextOpenWindow(WindowClass::Scenery); + auto* toolWindow = ContextOpenWindow(WindowClass::scenery); ToolSet(*toolWindow, WIDX_SCENERY_BACKGROUND, Tool::arrow); gInputFlags.set(InputFlag::unk6); } diff --git a/src/openrct2-ui/windows/SceneryScatter.cpp b/src/openrct2-ui/windows/SceneryScatter.cpp index f88cc0ddaf..a16f71d5ec 100644 --- a/src/openrct2-ui/windows/SceneryScatter.cpp +++ b/src/openrct2-ui/windows/SceneryScatter.cpp @@ -202,10 +202,10 @@ namespace OpenRCT2::Ui::Windows { // Check if window is already open auto* windowMgr = GetWindowManager(); - auto* window = windowMgr->FindByClass(WindowClass::SceneryScatter); + auto* window = windowMgr->FindByClass(WindowClass::sceneryScatter); if (window == nullptr) { - window = windowMgr->Create(WindowClass::SceneryScatter, kWindowSize, 0); + window = windowMgr->Create(WindowClass::sceneryScatter, kWindowSize, 0); } return window; diff --git a/src/openrct2-ui/windows/ServerList.cpp b/src/openrct2-ui/windows/ServerList.cpp index 2f32089db0..745aedf921 100644 --- a/src/openrct2-ui/windows/ServerList.cpp +++ b/src/openrct2-ui/windows/ServerList.cpp @@ -152,7 +152,7 @@ namespace OpenRCT2::Ui::Windows textInputOpen(widgetIndex, STR_ADD_SERVER, STR_ENTER_HOSTNAME_OR_IP_ADDRESS, {}, kStringIdNone, 0, 128); break; case WIDX_START_SERVER: - ContextOpenWindow(WindowClass::ServerStart); + ContextOpenWindow(WindowClass::serverStart); break; } } @@ -535,12 +535,12 @@ namespace OpenRCT2::Ui::Windows { // Check if window is already open auto* windowMgr = GetWindowManager(); - auto* window = windowMgr->BringToFrontByClass(WindowClass::ServerList); + auto* window = windowMgr->BringToFrontByClass(WindowClass::serverList); if (window != nullptr) return window; window = windowMgr->Create( - WindowClass::ServerList, kMinimumWindowSize, WF_10 | WF_RESIZABLE | WF_CENTRE_SCREEN); + WindowClass::serverList, kMinimumWindowSize, WF_10 | WF_RESIZABLE | WF_CENTRE_SCREEN); return window; } diff --git a/src/openrct2-ui/windows/ServerStart.cpp b/src/openrct2-ui/windows/ServerStart.cpp index a9365ab887..4892292a57 100644 --- a/src/openrct2-ui/windows/ServerStart.cpp +++ b/src/openrct2-ui/windows/ServerStart.cpp @@ -132,7 +132,7 @@ namespace OpenRCT2::Ui::Windows break; case WIDX_LOAD_SERVER: Network::SetPassword(_password); - auto intent = Intent(WindowClass::Loadsave); + auto intent = Intent(WindowClass::loadsave); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::load); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::park); intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(LoadSaveCallback)); @@ -142,7 +142,7 @@ namespace OpenRCT2::Ui::Windows } void onPrepareDraw() override { - ColourSchemeUpdateByClass(this, WindowClass::ServerList); + ColourSchemeUpdateByClass(this, WindowClass::serverList); setCheckboxValue(WIDX_ADVERTISE_CHECKBOX, Config::Get().network.Advertise); auto ft = Formatter::Common(); @@ -275,7 +275,7 @@ namespace OpenRCT2::Ui::Windows WindowBase* ServerStartOpen() { auto* windowMgr = GetWindowManager(); - return windowMgr->FocusOrCreate(WindowClass::ServerStart, kWindowSize, WF_CENTRE_SCREEN); + return windowMgr->FocusOrCreate(WindowClass::serverStart, kWindowSize, WF_CENTRE_SCREEN); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/ShortcutKeys.cpp b/src/openrct2-ui/windows/ShortcutKeys.cpp index 0d7ee53d44..3954c958f4 100644 --- a/src/openrct2-ui/windows/ShortcutKeys.cpp +++ b/src/openrct2-ui/windows/ShortcutKeys.cpp @@ -77,9 +77,9 @@ namespace OpenRCT2::Ui::Windows if (registeredShortcut != nullptr) { auto* windowMgr = GetWindowManager(); - windowMgr->CloseByClass(WindowClass::ChangeKeyboardShortcut); + windowMgr->CloseByClass(WindowClass::changeKeyboardShortcut); auto* w = windowMgr->Create( - WindowClass::ChangeKeyboardShortcut, kWindowSizeChange, WF_CENTRE_SCREEN); + WindowClass::changeKeyboardShortcut, kWindowSizeChange, WF_CENTRE_SCREEN); if (w != nullptr) { w->_shortcutId = shortcutId; @@ -190,7 +190,7 @@ namespace OpenRCT2::Ui::Windows void onClose() override { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::ResetShortcutKeysPrompt); + windowMgr->CloseByClass(WindowClass::resetShortcutKeysPrompt); } void onResize() override @@ -541,7 +541,7 @@ namespace OpenRCT2::Ui::Windows void ChangeShortcutWindow::NotifyShortcutKeysWindow() { auto* windowMgr = GetWindowManager(); - auto w = windowMgr->FindByClass(WindowClass::KeyboardShortcutList); + auto w = windowMgr->FindByClass(WindowClass::keyboardShortcutList); if (w != nullptr) { static_cast(w)->RefreshBindings(); @@ -551,10 +551,10 @@ namespace OpenRCT2::Ui::Windows WindowBase* ShortcutKeysOpen() { auto* windowMgr = GetWindowManager(); - auto w = windowMgr->BringToFrontByClass(WindowClass::KeyboardShortcutList); + auto w = windowMgr->BringToFrontByClass(WindowClass::keyboardShortcutList); if (w == nullptr) { - w = windowMgr->Create(WindowClass::KeyboardShortcutList, kWindowSize, WF_RESIZABLE); + w = windowMgr->Create(WindowClass::keyboardShortcutList, kWindowSize, WF_RESIZABLE); } return w; } @@ -595,7 +595,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_RESET_PROMPT_RESET: { auto* windowMgr = GetWindowManager(); - auto w = windowMgr->FindByClass(WindowClass::KeyboardShortcutList); + auto w = windowMgr->FindByClass(WindowClass::keyboardShortcutList); if (w != nullptr) { static_cast(w)->ResetAllOnActiveTab(); @@ -615,7 +615,7 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); return windowMgr->FocusOrCreate( - WindowClass::ResetShortcutKeysPrompt, kWindowSizeReset, WF_CENTRE_SCREEN | WF_TRANSPARENT); + WindowClass::resetShortcutKeysPrompt, kWindowSizeReset, WF_CENTRE_SCREEN | WF_TRANSPARENT); } #pragma endregion } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/Sign.cpp b/src/openrct2-ui/windows/Sign.cpp index 2e364ca4f2..1778449cc2 100644 --- a/src/openrct2-ui/windows/Sign.cpp +++ b/src/openrct2-ui/windows/Sign.cpp @@ -332,12 +332,12 @@ namespace OpenRCT2::Ui::Windows WindowBase* SignOpen(WindowNumber number) { auto* windowMgr = GetWindowManager(); - auto* w = static_cast(windowMgr->BringToFrontByNumber(WindowClass::Banner, number)); + auto* w = static_cast(windowMgr->BringToFrontByNumber(WindowClass::banner, number)); if (w != nullptr) return w; - w = windowMgr->Create(WindowClass::Banner, kWindowSize, 0); + w = windowMgr->Create(WindowClass::banner, kWindowSize, 0); if (w == nullptr) return nullptr; @@ -356,12 +356,12 @@ namespace OpenRCT2::Ui::Windows WindowBase* SignSmallOpen(WindowNumber number) { auto* windowMgr = GetWindowManager(); - auto* w = static_cast(windowMgr->BringToFrontByNumber(WindowClass::Banner, number)); + auto* w = static_cast(windowMgr->BringToFrontByNumber(WindowClass::banner, number)); if (w != nullptr) return w; - w = windowMgr->Create(WindowClass::Banner, kWindowSize, 0); + w = windowMgr->Create(WindowClass::banner, kWindowSize, 0); if (w == nullptr) return nullptr; diff --git a/src/openrct2-ui/windows/Staff.cpp b/src/openrct2-ui/windows/Staff.cpp index f9b88c1ea7..dab4886ba9 100644 --- a/src/openrct2-ui/windows/Staff.cpp +++ b/src/openrct2-ui/windows/Staff.cpp @@ -345,7 +345,7 @@ namespace OpenRCT2::Ui::Windows void CommonPrepareDrawBefore() { - ColourSchemeUpdateByClass(this, static_cast(WindowClass::Staff)); + ColourSchemeUpdateByClass(this, static_cast(WindowClass::staff)); SetPressedTab(); DisableWidgets(); @@ -392,7 +392,7 @@ namespace OpenRCT2::Ui::Windows return; auto* windowMgr = GetWindowManager(); - WindowBase* wind = windowMgr->FindByNumber(WindowClass::Peep, peepnum); + WindowBase* wind = windowMgr->FindByNumber(WindowClass::peep, peepnum); if (wind != nullptr) { ToolSet(*wind, WC_STAFF__WIDX_PICKUP, Tool::picker); @@ -403,7 +403,7 @@ namespace OpenRCT2::Ui::Windows break; case WIDX_FIRE: { - auto intent = Intent(WindowClass::FirePrompt); + auto intent = Intent(WindowClass::firePrompt); intent.PutExtra(INTENT_EXTRA_PEEP, staff); ContextOpenIntent(&intent); break; @@ -483,7 +483,7 @@ namespace OpenRCT2::Ui::Windows } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::PatrolArea); + windowMgr->CloseByClass(WindowClass::patrolArea); auto staffSetPatrolAreaAction = GameActions::StaffSetPatrolAreaAction( staff->Id, {}, GameActions::StaffSetPatrolAreaMode::ClearAll); @@ -495,7 +495,7 @@ namespace OpenRCT2::Ui::Windows if (WindowPatrolAreaGetCurrentStaffId() == staffId) { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::PatrolArea); + windowMgr->CloseByClass(WindowClass::patrolArea); } else { @@ -1226,11 +1226,11 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); - auto w = static_cast(windowMgr->BringToFrontByNumber(WindowClass::Peep, peep->Id.ToUnderlying())); + auto w = static_cast(windowMgr->BringToFrontByNumber(WindowClass::peep, peep->Id.ToUnderlying())); if (w != nullptr) return w; - w = windowMgr->Create(WindowClass::Peep, kWindowSize, WF_10 | WF_RESIZABLE); + w = windowMgr->Create(WindowClass::peep, kWindowSize, WF_10 | WF_RESIZABLE); if (w == nullptr) return nullptr; diff --git a/src/openrct2-ui/windows/StaffFirePrompt.cpp b/src/openrct2-ui/windows/StaffFirePrompt.cpp index 035df03a9c..6d2a8aa776 100644 --- a/src/openrct2-ui/windows/StaffFirePrompt.cpp +++ b/src/openrct2-ui/windows/StaffFirePrompt.cpp @@ -96,7 +96,7 @@ namespace OpenRCT2::Ui::Windows // Check if the confirm window already exists auto* windowMgr = GetWindowManager(); auto* window = windowMgr->FocusOrCreate( - WindowClass::FirePrompt, kWindowSize, WF_CENTRE_SCREEN | WF_TRANSPARENT); + WindowClass::firePrompt, kWindowSize, WF_CENTRE_SCREEN | WF_TRANSPARENT); window->setWindowNumber(peep->Id.ToUnderlying()); return window; } diff --git a/src/openrct2-ui/windows/StaffList.cpp b/src/openrct2-ui/windows/StaffList.cpp index 6f7a54d9fe..b2aaae4074 100644 --- a/src/openrct2-ui/windows/StaffList.cpp +++ b/src/openrct2-ui/windows/StaffList.cpp @@ -155,7 +155,7 @@ namespace OpenRCT2::Ui::Windows } break; case WIDX_STAFF_LIST_MAP: - ContextOpenWindow(WindowClass::Map); + ContextOpenWindow(WindowClass::map); break; case WIDX_STAFF_LIST_QUICK_FIRE: _quickFireMode = !_quickFireMode; @@ -181,7 +181,7 @@ namespace OpenRCT2::Ui::Windows // Enable highlighting of these staff members in map window auto* windowMgr = GetWindowManager(); - if (windowMgr->FindByClass(WindowClass::Map) != nullptr) + if (windowMgr->FindByClass(WindowClass::map) != nullptr) { for (auto peep : EntityList()) { @@ -352,7 +352,7 @@ namespace OpenRCT2::Ui::Windows auto peep = gameState.entities.GetEntity(entry.Id); if (peep != nullptr) { - auto intent = Intent(WindowClass::Peep); + auto intent = Intent(WindowClass::peep); intent.PutExtra(INTENT_EXTRA_PEEP, peep); ContextOpenIntent(&intent); } @@ -565,7 +565,7 @@ namespace OpenRCT2::Ui::Windows return; auto* staff2 = getGameState().entities.GetEntity(staffId); - auto intent = Intent(WindowClass::Peep); + auto intent = Intent(WindowClass::peep); intent.PutExtra(INTENT_EXTRA_PEEP, staff2); auto* wind = ContextOpenIntent(&intent); if (wind != nullptr) @@ -578,7 +578,7 @@ namespace OpenRCT2::Ui::Windows else { // Open window for new staff. - auto intent = Intent(WindowClass::Peep); + auto intent = Intent(WindowClass::peep); intent.PutExtra(INTENT_EXTRA_PEEP, staff); ContextOpenIntent(&intent); } @@ -731,13 +731,13 @@ namespace OpenRCT2::Ui::Windows WindowBase* StaffListOpen() { auto* windowMgr = GetWindowManager(); - return windowMgr->FocusOrCreate(WindowClass::StaffList, kWindowSize, WF_10 | WF_RESIZABLE); + return windowMgr->FocusOrCreate(WindowClass::staffList, kWindowSize, WF_10 | WF_RESIZABLE); } void WindowStaffListRefresh() { auto* windowMgr = GetWindowManager(); - auto* window = windowMgr->FindByClass(WindowClass::StaffList); + auto* window = windowMgr->FindByClass(WindowClass::staffList); if (window != nullptr) { static_cast(window)->RefreshList(); diff --git a/src/openrct2-ui/windows/TextInput.cpp b/src/openrct2-ui/windows/TextInput.cpp index da68bdcdc1..a3022c41fa 100644 --- a/src/openrct2-ui/windows/TextInput.cpp +++ b/src/openrct2-ui/windows/TextInput.cpp @@ -71,7 +71,7 @@ namespace OpenRCT2::Ui::Windows // Save calling window details so that the information can be passed back to the correct window & widget if (parentWindow == nullptr) { - _parentWidget.window.classification = WindowClass::Null; + _parentWidget.window.classification = WindowClass::null; _parentWidget.window.number = 0; _parentWidget.widgetIndex = 0; @@ -354,7 +354,7 @@ namespace OpenRCT2::Ui::Windows bool HasParentWindow() const { - return _parentWidget.window.classification != WindowClass::Null; + return _parentWidget.window.classification != WindowClass::null; } WindowBase* GetParentWindow() const @@ -370,10 +370,10 @@ namespace OpenRCT2::Ui::Windows const_utf8string existing_text, int32_t maxLength) { auto* windowMgr = GetWindowManager(); - windowMgr->CloseByClass(WindowClass::Textinput); + windowMgr->CloseByClass(WindowClass::textinput); auto w = windowMgr->Create( - WindowClass::Textinput, { kWindowSize.width, kWindowSize.height + 10 }, WF_CENTRE_SCREEN | WF_STICK_TO_FRONT); + WindowClass::textinput, { kWindowSize.width, kWindowSize.height + 10 }, WF_CENTRE_SCREEN | WF_STICK_TO_FRONT); if (w != nullptr) { w->setParentWindow(call_w, call_widget); @@ -388,7 +388,7 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); auto w = windowMgr->Create( - WindowClass::Textinput, { kWindowSize.width, kWindowSize.height + 10 }, WF_CENTRE_SCREEN | WF_STICK_TO_FRONT); + WindowClass::textinput, { kWindowSize.width, kWindowSize.height + 10 }, WF_CENTRE_SCREEN | WF_STICK_TO_FRONT); if (w != nullptr) { w->setTitle(title, description); @@ -413,7 +413,7 @@ namespace OpenRCT2::Ui::Windows // If the return button is pressed stop text input if (keycode == SDLK_RETURN || keycode == SDLK_KP_ENTER) { - if (w->classification == WindowClass::Textinput) + if (w->classification == WindowClass::textinput) { auto textInputWindow = static_cast(w); textInputWindow->onReturnPressed(); diff --git a/src/openrct2-ui/windows/Themes.cpp b/src/openrct2-ui/windows/Themes.cpp index 806713b7cd..4fa1c265a6 100644 --- a/src/openrct2-ui/windows/Themes.cpp +++ b/src/openrct2-ui/windows/Themes.cpp @@ -143,90 +143,90 @@ namespace OpenRCT2::Ui::Windows }; static WindowClass window_themes_tab_1_classes[] = { - WindowClass::TopToolbar, - WindowClass::BottomToolbar, - WindowClass::EditorScenarioBottomToolbar, - WindowClass::EditorTrackBottomToolbar, - WindowClass::TitleMenu, - WindowClass::TitleExit, - WindowClass::TitleOptions, - WindowClass::ScenarioSelect, + WindowClass::topToolbar, + WindowClass::bottomToolbar, + WindowClass::editorScenarioBottomToolbar, + WindowClass::editorTrackBottomToolbar, + WindowClass::titleMenu, + WindowClass::titleExit, + WindowClass::titleOptions, + WindowClass::scenarioSelect, }; static WindowClass window_themes_tab_2_classes[] = { - WindowClass::ParkInformation, - WindowClass::EditorParkEntrance, - WindowClass::Finances, - WindowClass::NewCampaign, - WindowClass::Research, - WindowClass::Map, - WindowClass::Viewport, - WindowClass::RecentNews, + WindowClass::parkInformation, + WindowClass::editorParkEntrance, + WindowClass::finances, + WindowClass::newCampaign, + WindowClass::research, + WindowClass::map, + WindowClass::viewport, + WindowClass::recentNews, }; static WindowClass window_themes_tab_3_classes[] = { - WindowClass::Land, - WindowClass::Water, - WindowClass::ClearScenery, - WindowClass::LandRights, - WindowClass::Scenery, - WindowClass::SceneryScatter, - WindowClass::Footpath, - WindowClass::RideConstruction, - WindowClass::TrackDesignPlace, - WindowClass::ConstructRide, - WindowClass::TrackDesignList, - WindowClass::PatrolArea, + WindowClass::land, + WindowClass::water, + WindowClass::clearScenery, + WindowClass::landRights, + WindowClass::scenery, + WindowClass::sceneryScatter, + WindowClass::footpath, + WindowClass::rideConstruction, + WindowClass::trackDesignPlace, + WindowClass::constructRide, + WindowClass::trackDesignList, + WindowClass::patrolArea, }; static WindowClass window_themes_tab_4_classes[] = { - WindowClass::Ride, - WindowClass::RideList, - WindowClass::Peep, - WindowClass::GuestList, - WindowClass::Staff, - WindowClass::StaffList, - WindowClass::Banner, + WindowClass::ride, + WindowClass::rideList, + WindowClass::peep, + WindowClass::guestList, + WindowClass::staff, + WindowClass::staffList, + WindowClass::banner, }; static WindowClass window_themes_tab_5_classes[] = { - WindowClass::EditorObjectSelection, - WindowClass::EditorInventionList, - WindowClass::EditorScenarioOptions, - WindowClass::Mapgen, - WindowClass::ManageTrackDesign, - WindowClass::InstallTrack, + WindowClass::editorObjectSelection, + WindowClass::editorInventionList, + WindowClass::editorScenarioOptions, + WindowClass::mapgen, + WindowClass::manageTrackDesign, + WindowClass::installTrack, }; static WindowClass window_themes_tab_6_classes[] = { - WindowClass::Cheats, - WindowClass::TileInspector, - WindowClass::ViewClipping, - WindowClass::Transparency, - WindowClass::Themes, - WindowClass::Options, - WindowClass::KeyboardShortcutList, - WindowClass::ChangeKeyboardShortcut, - WindowClass::AssetPacks, - WindowClass::Loadsave, - WindowClass::About, - WindowClass::Changelog, - WindowClass::ServerList, - WindowClass::Multiplayer, - WindowClass::Player, - WindowClass::Chat, - WindowClass::Console, + WindowClass::cheats, + WindowClass::tileInspector, + WindowClass::viewClipping, + WindowClass::transparency, + WindowClass::themes, + WindowClass::options, + WindowClass::keyboardShortcutList, + WindowClass::changeKeyboardShortcut, + WindowClass::assetPacks, + WindowClass::loadsave, + WindowClass::about, + WindowClass::changelog, + WindowClass::serverList, + WindowClass::multiplayer, + WindowClass::player, + WindowClass::chat, + WindowClass::console, }; static WindowClass window_themes_tab_7_classes[] = { - WindowClass::Error, - WindowClass::SavePrompt, - WindowClass::DemolishRidePrompt, - WindowClass::FirePrompt, - WindowClass::TrackDeletePrompt, - WindowClass::LoadsaveOverwritePrompt, - WindowClass::ProgressWindow, - WindowClass::NetworkStatus, + WindowClass::error, + WindowClass::savePrompt, + WindowClass::demolishRidePrompt, + WindowClass::firePrompt, + WindowClass::trackDeletePrompt, + WindowClass::loadsaveOverwritePrompt, + WindowClass::progressWindow, + WindowClass::networkStatus, }; static WindowClass* window_themes_tab_classes[] = { @@ -310,7 +310,7 @@ namespace OpenRCT2::Ui::Windows pressedWidgets = newPressedWidgets | (1 << widgetIndex); auto* windowMgr = GetWindowManager(); - if (windowMgr->FindByClass(WindowClass::Dropdown) == nullptr) + if (windowMgr->FindByClass(WindowClass::dropdown) == nullptr) { _classIndex = -1; _buttonIndex = -1; @@ -901,11 +901,11 @@ namespace OpenRCT2::Ui::Windows { // Check if window is already open auto* windowMgr = GetWindowManager(); - auto* window = windowMgr->BringToFrontByClass(WindowClass::Themes); + auto* window = windowMgr->BringToFrontByClass(WindowClass::themes); if (window != nullptr) return window; - window = windowMgr->Create(WindowClass::Themes, kWindowSize, WF_10 | WF_RESIZABLE); + window = windowMgr->Create(WindowClass::themes, kWindowSize, WF_10 | WF_RESIZABLE); return window; } diff --git a/src/openrct2-ui/windows/TileInspector.cpp b/src/openrct2-ui/windows/TileInspector.cpp index 7efe8c0b22..ae6ff017c0 100644 --- a/src/openrct2-ui/windows/TileInspector.cpp +++ b/src/openrct2-ui/windows/TileInspector.cpp @@ -533,7 +533,7 @@ static uint64_t PageDisabledWidgets[] = { _highlightedIndex = -1; } - if (!isToolActive(WindowClass::TileInspector)) + if (!isToolActive(WindowClass::tileInspector)) close(); } @@ -741,7 +741,7 @@ static uint64_t PageDisabledWidgets[] = { void onClose() override { - if (isToolActive(WindowClass::TileInspector)) + if (isToolActive(WindowClass::tileInspector)) ToolCancel(); TileElement* const elem = OpenRCT2::TileInspector::GetSelectedElement(); @@ -2451,17 +2451,17 @@ static uint64_t PageDisabledWidgets[] = { WindowBase* TileInspectorOpen() { auto* windowMgr = GetWindowManager(); - WindowBase* window = windowMgr->BringToFrontByClass(WindowClass::TileInspector); + WindowBase* window = windowMgr->BringToFrontByClass(WindowClass::tileInspector); if (window == nullptr) window = windowMgr->Create( - WindowClass::TileInspector, ScreenCoordsXY(0, 29), kWindowSize, WF_RESIZABLE); + WindowClass::tileInspector, ScreenCoordsXY(0, 29), kWindowSize, WF_RESIZABLE); return window; } void WindowTileInspectorClearClipboard() { auto* windowMgr = GetWindowManager(); - auto* window = windowMgr->FindByClass(WindowClass::TileInspector); + auto* window = windowMgr->FindByClass(WindowClass::tileInspector); if (window != nullptr) static_cast(window)->ClearClipboard(); } @@ -2469,7 +2469,7 @@ static uint64_t PageDisabledWidgets[] = { void WindowTileInspectorKeyboardShortcutToggleInvisibility() { auto* windowMgr = GetWindowManager(); - auto* window = windowMgr->FindByClass(WindowClass::TileInspector); + auto* window = windowMgr->FindByClass(WindowClass::tileInspector); if (window != nullptr) static_cast(window)->ToggleInvisibility(); } diff --git a/src/openrct2-ui/windows/TitleExit.cpp b/src/openrct2-ui/windows/TitleExit.cpp index b9a50e0282..26d2c6100a 100644 --- a/src/openrct2-ui/windows/TitleExit.cpp +++ b/src/openrct2-ui/windows/TitleExit.cpp @@ -58,7 +58,7 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); return windowMgr->Create( - WindowClass::TitleExit, ScreenCoordsXY(ContextGetWidth() - 40, ContextGetHeight() - 64), kWindowSize, + WindowClass::titleExit, ScreenCoordsXY(ContextGetWidth() - 40, ContextGetHeight() - 64), kWindowSize, WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_TITLE_BAR); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/TitleLogo.cpp b/src/openrct2-ui/windows/TitleLogo.cpp index 1c54cf5d20..b699360826 100644 --- a/src/openrct2-ui/windows/TitleLogo.cpp +++ b/src/openrct2-ui/windows/TitleLogo.cpp @@ -67,11 +67,11 @@ namespace OpenRCT2::Ui::Windows WindowBase* TitleLogoOpen() { auto* windowMgr = GetWindowManager(); - auto* window = windowMgr->BringToFrontByClass(WindowClass::TitleLogo); + auto* window = windowMgr->BringToFrontByClass(WindowClass::titleLogo); if (window == nullptr) { window = windowMgr->Create( - WindowClass::TitleLogo, ScreenCoordsXY(0, 0), kWindowSize, WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_TITLE_BAR); + WindowClass::titleLogo, ScreenCoordsXY(0, 0), kWindowSize, WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_TITLE_BAR); } return window; } diff --git a/src/openrct2-ui/windows/TitleMenu.cpp b/src/openrct2-ui/windows/TitleMenu.cpp index 33948b78a7..b3a0bcb686 100644 --- a/src/openrct2-ui/windows/TitleMenu.cpp +++ b/src/openrct2-ui/windows/TitleMenu.cpp @@ -126,43 +126,43 @@ namespace OpenRCT2::Ui::Windows switch (widgetIndex) { case WIDX_START_NEW_GAME: - windowToOpen = windowMgr->FindByClass(WindowClass::ScenarioSelect); + windowToOpen = windowMgr->FindByClass(WindowClass::scenarioSelect); if (windowToOpen != nullptr) { windowMgr->BringToFront(*windowToOpen); } else { - windowMgr->CloseByClass(WindowClass::Loadsave); - windowMgr->CloseByClass(WindowClass::ServerList); + windowMgr->CloseByClass(WindowClass::loadsave); + windowMgr->CloseByClass(WindowClass::serverList); ScenarioselectOpen(WindowTitleMenuScenarioselectCallback); } break; case WIDX_CONTINUE_SAVED_GAME: - windowToOpen = windowMgr->FindByClass(WindowClass::Loadsave); + windowToOpen = windowMgr->FindByClass(WindowClass::loadsave); if (windowToOpen != nullptr) { windowMgr->BringToFront(*windowToOpen); } else { - windowMgr->CloseByClass(WindowClass::ScenarioSelect); - windowMgr->CloseByClass(WindowClass::ServerList); + windowMgr->CloseByClass(WindowClass::scenarioSelect); + windowMgr->CloseByClass(WindowClass::serverList); auto loadOrQuitAction = GameActions::LoadOrQuitAction(GameActions::LoadOrQuitModes::OpenSavePrompt); GameActions::Execute(&loadOrQuitAction, getGameState()); } break; case WIDX_MULTIPLAYER: - windowToOpen = windowMgr->FindByClass(WindowClass::ServerList); + windowToOpen = windowMgr->FindByClass(WindowClass::serverList); if (windowToOpen != nullptr) { windowMgr->BringToFront(*windowToOpen); } else { - windowMgr->CloseByClass(WindowClass::ScenarioSelect); - windowMgr->CloseByClass(WindowClass::Loadsave); - ContextOpenWindow(WindowClass::ServerList); + windowMgr->CloseByClass(WindowClass::scenarioSelect); + windowMgr->CloseByClass(WindowClass::loadsave); + ContextOpenWindow(WindowClass::serverList); } break; case WIDX_NEW_VERSION: @@ -287,7 +287,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = GetWindowManager(); return windowMgr->Create( - WindowClass::TitleMenu, ScreenCoordsXY(0, ContextGetHeight() - 182), { 0, windowHeight }, + WindowClass::titleMenu, ScreenCoordsXY(0, ContextGetHeight() - 182), { 0, windowHeight }, WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_BACKGROUND | WF_NO_TITLE_BAR); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/TitleOptions.cpp b/src/openrct2-ui/windows/TitleOptions.cpp index 18f4cfade1..2254ca7cae 100644 --- a/src/openrct2-ui/windows/TitleOptions.cpp +++ b/src/openrct2-ui/windows/TitleOptions.cpp @@ -38,7 +38,7 @@ namespace OpenRCT2::Ui::Windows switch (widgetIndex) { case WIDX_OPTIONS: - ContextOpenWindow(WindowClass::Options); + ContextOpenWindow(WindowClass::options); break; } } @@ -55,11 +55,11 @@ namespace OpenRCT2::Ui::Windows WindowBase* TitleOptionsOpen() { auto* windowMgr = GetWindowManager(); - auto* window = windowMgr->BringToFrontByClass(WindowClass::TitleOptions); + auto* window = windowMgr->BringToFrontByClass(WindowClass::titleOptions); if (window == nullptr) { window = windowMgr->Create( - WindowClass::TitleOptions, ScreenCoordsXY(ContextGetWidth() - 80, 0), kWindowSize, + WindowClass::titleOptions, ScreenCoordsXY(ContextGetWidth() - 80, 0), kWindowSize, WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_TITLE_BAR); } diff --git a/src/openrct2-ui/windows/TitleVersion.cpp b/src/openrct2-ui/windows/TitleVersion.cpp index 5ea0d9f334..72f897cddb 100644 --- a/src/openrct2-ui/windows/TitleVersion.cpp +++ b/src/openrct2-ui/windows/TitleVersion.cpp @@ -40,11 +40,11 @@ namespace OpenRCT2::Ui::Windows WindowBase* TitleVersionOpen() { auto* windowMgr = GetWindowManager(); - auto* window = windowMgr->BringToFrontByClass(WindowClass::TitleVersion); + auto* window = windowMgr->BringToFrontByClass(WindowClass::titleVersion); if (window == nullptr) { window = windowMgr->Create( - WindowClass::TitleVersion, ScreenCoordsXY(kTextOffset, ContextGetHeight() - 30), kWindowSize, + WindowClass::titleVersion, ScreenCoordsXY(kTextOffset, ContextGetHeight() - 30), kWindowSize, WF_STICK_TO_BACK | WF_TRANSPARENT | WF_NO_TITLE_BAR); } return window; diff --git a/src/openrct2-ui/windows/Tooltip.cpp b/src/openrct2-ui/windows/Tooltip.cpp index 8329d3724c..0a5989b814 100644 --- a/src/openrct2-ui/windows/Tooltip.cpp +++ b/src/openrct2-ui/windows/Tooltip.cpp @@ -153,7 +153,7 @@ namespace OpenRCT2::Ui::Windows { gTooltipCursor = screenCoords; gTooltipCloseTimeout = 0; - gTooltipWidget.windowClassification = WindowClass::Null; + gTooltipWidget.windowClassification = WindowClass::null; InputSetState(InputState::Normal); gInputFlags.unset(InputFlag::leftMousePressed); } @@ -167,7 +167,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = GetWindowManager(); windowMgr->Create( - std::move(tooltipWindow), WindowClass::Tooltip, windowPos, { width, height }, + std::move(tooltipWindow), WindowClass::tooltip, windowPos, { width, height }, WF_TRANSPARENT | WF_STICK_TO_FRONT | WF_NO_TITLE_BAR); } @@ -211,9 +211,9 @@ namespace OpenRCT2::Ui::Windows void WindowTooltipClose() { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::Tooltip); + windowMgr->CloseByClass(WindowClass::tooltip); gTooltipCloseTimeout = 0; - gTooltipWidget.windowClassification = WindowClass::Null; + gTooltipWidget.windowClassification = WindowClass::null; } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/TopToolbar.cpp b/src/openrct2-ui/windows/TopToolbar.cpp index 6bba56abb9..acebb92fef 100644 --- a/src/openrct2-ui/windows/TopToolbar.cpp +++ b/src/openrct2-ui/windows/TopToolbar.cpp @@ -393,9 +393,9 @@ namespace OpenRCT2::Ui::Windows case DDIDX_VIEW_CLIPPING: { auto* windowMgr = GetWindowManager(); - if (windowMgr->FindByClass(WindowClass::ViewClipping) == nullptr) + if (windowMgr->FindByClass(WindowClass::viewClipping) == nullptr) { - ContextOpenWindow(WindowClass::ViewClipping); + ContextOpenWindow(WindowClass::viewClipping); } else { @@ -408,7 +408,7 @@ namespace OpenRCT2::Ui::Windows w->viewport->flags ^= VIEWPORT_FLAG_HIGHLIGHT_PATH_ISSUES; break; case DDIDX_TRANSPARENCY: - ContextOpenWindow(WindowClass::Transparency); + ContextOpenWindow(WindowClass::transparency); break; default: return; @@ -462,13 +462,13 @@ namespace OpenRCT2::Ui::Windows switch (dropdownIndex) { case 0: - ContextOpenWindow(WindowClass::Map); + ContextOpenWindow(WindowClass::map); break; case 1: - ContextOpenWindow(WindowClass::Viewport); + ContextOpenWindow(WindowClass::viewport); break; case 2: - ContextOpenWindow(WindowClass::Mapgen); + ContextOpenWindow(WindowClass::mapgen); break; } } @@ -687,23 +687,23 @@ namespace OpenRCT2::Ui::Windows switch (dropdownIndex) { case DDIDX_CHEATS: - ContextOpenWindow(WindowClass::Cheats); + ContextOpenWindow(WindowClass::cheats); break; case DDIDX_TILE_INSPECTOR: - ContextOpenWindow(WindowClass::TileInspector); + ContextOpenWindow(WindowClass::tileInspector); break; case DDIDX_OBJECT_SELECTION: { auto* windowMgr = Ui::GetWindowManager(); windowMgr->CloseAll(); - ContextOpenWindow(WindowClass::EditorObjectSelection); + ContextOpenWindow(WindowClass::editorObjectSelection); break; } case DDIDX_INVENTIONS_LIST: - ContextOpenWindow(WindowClass::EditorInventionList); + ContextOpenWindow(WindowClass::editorInventionList); break; case DDIDX_SCENARIO_OPTIONS: - ContextOpenWindow(WindowClass::EditorScenarioOptions); + ContextOpenWindow(WindowClass::editorScenarioOptions); break; case DDIDX_ENABLE_SANDBOX_MODE: CheatsSet(CheatType::SandboxMode, !getGameState().cheats.sandboxMode); @@ -727,8 +727,8 @@ namespace OpenRCT2::Ui::Windows colours[0].withFlag(ColourFlag::translucent, true), Dropdown::Flag::StayOpen, TOP_TOOLBAR_DEBUG_COUNT); auto* windowMgr = GetWindowManager(); - gDropdown.items[DDIDX_CONSOLE].setChecked(windowMgr->FindByClass(WindowClass::Console) != nullptr); - gDropdown.items[DDIDX_DEBUG_PAINT].setChecked(windowMgr->FindByClass(WindowClass::DebugPaint) != nullptr); + gDropdown.items[DDIDX_CONSOLE].setChecked(windowMgr->FindByClass(WindowClass::console) != nullptr); + gDropdown.items[DDIDX_DEBUG_PAINT].setChecked(windowMgr->FindByClass(WindowClass::debugPaint) != nullptr); } void debugMenuDropdown(int16_t dropdownIndex) @@ -747,13 +747,13 @@ namespace OpenRCT2::Ui::Windows case DDIDX_DEBUG_PAINT: { auto* windowMgr = GetWindowManager(); - if (windowMgr->FindByClass(WindowClass::DebugPaint) == nullptr) + if (windowMgr->FindByClass(WindowClass::debugPaint) == nullptr) { - ContextOpenWindow(WindowClass::DebugPaint); + ContextOpenWindow(WindowClass::debugPaint); } else { - windowMgr->CloseByClass(WindowClass::DebugPaint); + windowMgr->CloseByClass(WindowClass::debugPaint); } break; } @@ -783,7 +783,7 @@ namespace OpenRCT2::Ui::Windows switch (dropdownIndex) { case DDIDX_MULTIPLAYER: - ContextOpenWindow(WindowClass::Multiplayer); + ContextOpenWindow(WindowClass::multiplayer); break; case DDIDX_MULTIPLAYER_RECONNECT: Network::Reconnect(); @@ -837,28 +837,28 @@ namespace OpenRCT2::Ui::Windows ToggleFootpathWindow(); break; case WIDX_CONSTRUCT_RIDE: - ContextOpenWindow(WindowClass::ConstructRide); + ContextOpenWindow(WindowClass::constructRide); break; case WIDX_RIDES: - ContextOpenWindow(WindowClass::RideList); + ContextOpenWindow(WindowClass::rideList); break; case WIDX_PARK: - ContextOpenWindow(WindowClass::ParkInformation); + ContextOpenWindow(WindowClass::parkInformation); break; case WIDX_STAFF: - ContextOpenWindow(WindowClass::StaffList); + ContextOpenWindow(WindowClass::staffList); break; case WIDX_GUESTS: - ContextOpenWindow(WindowClass::GuestList); + ContextOpenWindow(WindowClass::guestList); break; case WIDX_FINANCES: - ContextOpenWindow(WindowClass::Finances); + ContextOpenWindow(WindowClass::finances); break; case WIDX_RESEARCH: - ContextOpenWindow(WindowClass::Research); + ContextOpenWindow(WindowClass::research); break; case WIDX_NEWS: - ContextOpenWindow(WindowClass::RecentNews); + ContextOpenWindow(WindowClass::recentNews); break; case WIDX_MUTE: OpenRCT2::Audio::ToggleAllSounds(); @@ -958,7 +958,7 @@ namespace OpenRCT2::Ui::Windows case DDIDX_SAVE_GAME_AS: if (gLegacyScene == LegacyScene::scenarioEditor) { - auto intent = Intent(WindowClass::Loadsave); + auto intent = Intent(WindowClass::loadsave); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::save); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::landscape); intent.PutExtra(INTENT_EXTRA_PATH, getGameState().scenarioOptions.name); @@ -971,10 +971,10 @@ namespace OpenRCT2::Ui::Windows } break; case DDIDX_ABOUT: - ContextOpenWindow(WindowClass::About); + ContextOpenWindow(WindowClass::about); break; case DDIDX_OPTIONS: - ContextOpenWindow(WindowClass::Options); + ContextOpenWindow(WindowClass::options); break; case DDIDX_SCREENSHOT: gScreenshotCountdown = 10; @@ -998,8 +998,8 @@ namespace OpenRCT2::Ui::Windows case DDIDX_QUIT_TO_MENU: { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::ManageTrackDesign); - windowMgr->CloseByClass(WindowClass::TrackDeletePrompt); + windowMgr->CloseByClass(WindowClass::manageTrackDesign); + windowMgr->CloseByClass(WindowClass::trackDeletePrompt); auto loadOrQuitAction = GameActions::LoadOrQuitAction( GameActions::LoadOrQuitModes::OpenSavePrompt, PromptMode::saveBeforeQuit); GameActions::Execute(&loadOrQuitAction, gameState); @@ -1276,7 +1276,7 @@ namespace OpenRCT2::Ui::Windows { // Footpath button pressed down auto* windowMgr = GetWindowManager(); - if (windowMgr->FindByClass(WindowClass::Footpath) == nullptr) + if (windowMgr->FindByClass(WindowClass::footpath) == nullptr) pressedWidgets &= ~(1uLL << WIDX_PATH); else pressedWidgets |= (1uLL << WIDX_PATH); @@ -1509,7 +1509,7 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); auto* window = windowMgr->Create( - WindowClass::TopToolbar, ScreenCoordsXY(0, 0), { ContextGetWidth(), kTopToolbarHeight + 1 }, + WindowClass::topToolbar, ScreenCoordsXY(0, 0), { ContextGetWidth(), kTopToolbarHeight + 1 }, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_NO_BACKGROUND | WF_NO_TITLE_BAR); window->setWidgets(_topToolbarWidgets); diff --git a/src/openrct2-ui/windows/TrackDesignManage.cpp b/src/openrct2-ui/windows/TrackDesignManage.cpp index d7fc6cbe0f..e2717f8180 100644 --- a/src/openrct2-ui/windows/TrackDesignManage.cpp +++ b/src/openrct2-ui/windows/TrackDesignManage.cpp @@ -87,7 +87,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_CLOSE: { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::TrackDeletePrompt); + windowMgr->CloseByClass(WindowClass::trackDeletePrompt); close(); break; } @@ -122,7 +122,7 @@ namespace OpenRCT2::Ui::Windows if (TrackRepositoryRename(_trackDesignFileReference->path, std::string(text))) { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::TrackDeletePrompt); + windowMgr->CloseByClass(WindowClass::trackDeletePrompt); close(); WindowTrackDesignListReloadTracks(); } @@ -172,7 +172,7 @@ namespace OpenRCT2::Ui::Windows if (TrackRepositoryDelete(tdPath)) { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::ManageTrackDesign); + windowMgr->CloseByClass(WindowClass::manageTrackDesign); WindowTrackDesignListReloadTracks(); } else @@ -208,11 +208,11 @@ namespace OpenRCT2::Ui::Windows WindowBase* TrackManageOpen(TrackDesignFileRef* tdFileRef) { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::ManageTrackDesign); + windowMgr->CloseByClass(WindowClass::manageTrackDesign); auto trackDesignManageWindow = std::make_unique(tdFileRef); auto* window = windowMgr->Create( - std::move(trackDesignManageWindow), WindowClass::ManageTrackDesign, {}, kWindowSize, + std::move(trackDesignManageWindow), WindowClass::manageTrackDesign, {}, kWindowSize, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_CENTRE_SCREEN | WF_AUTO_POSITION); return window; @@ -225,12 +225,12 @@ namespace OpenRCT2::Ui::Windows static void WindowTrackDeletePromptOpen(TrackDesignFileRef* tdFileRef) { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::TrackDeletePrompt); + windowMgr->CloseByClass(WindowClass::trackDeletePrompt); auto trackDeletePromptWindow = std::make_unique(tdFileRef); windowMgr->Create( - std::move(trackDeletePromptWindow), WindowClass::TrackDeletePrompt, {}, kWindowSizeDeletePrompt, + std::move(trackDeletePromptWindow), WindowClass::trackDeletePrompt, {}, kWindowSizeDeletePrompt, WF_STICK_TO_FRONT | WF_TRANSPARENT | WF_AUTO_POSITION | WF_CENTRE_SCREEN); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/TrackDesignPlace.cpp b/src/openrct2-ui/windows/TrackDesignPlace.cpp index 3389e93274..c01c4ac05c 100644 --- a/src/openrct2-ui/windows/TrackDesignPlace.cpp +++ b/src/openrct2-ui/windows/TrackDesignPlace.cpp @@ -152,7 +152,7 @@ namespace OpenRCT2::Ui::Windows case WIDX_SELECT_DIFFERENT_DESIGN: close(); - auto intent = Intent(WindowClass::TrackDesignList); + auto intent = Intent(WindowClass::trackDesignList); intent.PutExtra(INTENT_EXTRA_RIDE_TYPE, _window_track_list_item.Type); intent.PutExtra(INTENT_EXTRA_RIDE_ENTRY_INDEX, _window_track_list_item.EntryIndex); ContextOpenIntent(&intent); @@ -162,7 +162,7 @@ namespace OpenRCT2::Ui::Windows void onUpdate() override { - if (!isToolActive(WindowClass::TrackDesignPlace)) + if (!isToolActive(WindowClass::trackDesignPlace)) close(); } @@ -298,23 +298,23 @@ namespace OpenRCT2::Ui::Windows if (getRide != nullptr) { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::Error); + windowMgr->CloseByClass(WindowClass::error); Audio::Play3D(Audio::SoundId::PlaceItem, trackLoc); _currentRideIndex = rideId; if (TrackDesignAreEntranceAndExitPlaced()) { - auto intent = Intent(WindowClass::Ride); + auto intent = Intent(WindowClass::ride); intent.PutExtra(INTENT_EXTRA_RIDE_ID, rideId.ToUnderlying()); ContextOpenIntent(&intent); - auto* wnd = windowMgr->FindByClass(WindowClass::TrackDesignPlace); + auto* wnd = windowMgr->FindByClass(WindowClass::trackDesignPlace); windowMgr->Close(*wnd); } else { RideInitialiseConstructionWindow(*getRide); - auto* wnd = windowMgr->FindByClass(WindowClass::RideConstruction); + auto* wnd = windowMgr->FindByClass(WindowClass::rideConstruction); wnd->onMouseUp(WC_RIDE_CONSTRUCTION__WIDX_ENTRANCE); } } @@ -755,7 +755,7 @@ namespace OpenRCT2::Ui::Windows auto* windowMgr = Ui::GetWindowManager(); windowMgr->CloseConstructionWindows(); - auto* window = windowMgr->FocusOrCreate(WindowClass::TrackDesignPlace, kWindowSize, 0); + auto* window = windowMgr->FocusOrCreate(WindowClass::trackDesignPlace, kWindowSize, 0); if (window != nullptr) { window->init(std::move(openTrackDesign)); @@ -766,7 +766,7 @@ namespace OpenRCT2::Ui::Windows void TrackPlaceClearProvisionalTemporarily() { auto* windowMgr = GetWindowManager(); - auto* trackPlaceWnd = static_cast(windowMgr->FindByClass(WindowClass::TrackDesignPlace)); + auto* trackPlaceWnd = static_cast(windowMgr->FindByClass(WindowClass::trackDesignPlace)); if (trackPlaceWnd != nullptr) { trackPlaceWnd->ClearProvisionalTemporarily(); @@ -776,7 +776,7 @@ namespace OpenRCT2::Ui::Windows void TrackPlaceRestoreProvisional() { auto* windowMgr = GetWindowManager(); - auto* trackPlaceWnd = static_cast(windowMgr->FindByClass(WindowClass::TrackDesignPlace)); + auto* trackPlaceWnd = static_cast(windowMgr->FindByClass(WindowClass::trackDesignPlace)); if (trackPlaceWnd != nullptr) { trackPlaceWnd->RestoreProvisional(); diff --git a/src/openrct2-ui/windows/TrackList.cpp b/src/openrct2-ui/windows/TrackList.cpp index 09de9e532d..89f05254ce 100644 --- a/src/openrct2-ui/windows/TrackList.cpp +++ b/src/openrct2-ui/windows/TrackList.cpp @@ -145,7 +145,7 @@ namespace OpenRCT2::Ui::Windows TrackDesignFileRef* tdRef = &_trackDesigns[trackDesignIndex]; if (gLegacyScene == LegacyScene::trackDesignsManager) { - auto intent = Intent(WindowClass::ManageTrackDesign); + auto intent = Intent(WindowClass::manageTrackDesign); intent.PutExtra(INTENT_EXTRA_TRACK_DESIGN, tdRef); ContextOpenIntent(&intent); } @@ -157,7 +157,7 @@ namespace OpenRCT2::Ui::Windows ContextShowError(STR_THIS_DESIGN_WILL_BE_BUILT_WITH_AN_ALTERNATIVE_VEHICLE_TYPE, kStringIdNone, {}); } - auto intent = Intent(WindowClass::TrackDesignPlace); + auto intent = Intent(WindowClass::trackDesignPlace); intent.PutExtra(INTENT_EXTRA_TRACK_DESIGN, tdRef); ContextOpenIntent(&intent); } @@ -242,8 +242,8 @@ namespace OpenRCT2::Ui::Windows void ReopenTrackManager() { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByNumber(WindowClass::ManageTrackDesign, number); - windowMgr->CloseByNumber(WindowClass::TrackDeletePrompt, number); + windowMgr->CloseByNumber(WindowClass::manageTrackDesign, number); + windowMgr->CloseByNumber(WindowClass::trackDeletePrompt, number); Editor::LoadTrackManager(); } @@ -289,7 +289,7 @@ namespace OpenRCT2::Ui::Windows close(); if (!(gLegacyScene == LegacyScene::trackDesignsManager)) { - ContextOpenWindow(WindowClass::ConstructRide); + ContextOpenWindow(WindowClass::constructRide); } else { @@ -767,13 +767,13 @@ namespace OpenRCT2::Ui::Windows screenPos = { 0, kTopToolbarHeight + 2 }; } - return windowMgr->Create(WindowClass::TrackDesignList, screenPos, kWindowSize, flags, item); + return windowMgr->Create(WindowClass::trackDesignList, screenPos, kWindowSize, flags, item); } void WindowTrackDesignListReloadTracks() { auto* windowMgr = GetWindowManager(); - auto* trackListWindow = static_cast(windowMgr->FindByClass(WindowClass::TrackDesignList)); + auto* trackListWindow = static_cast(windowMgr->FindByClass(WindowClass::trackDesignList)); if (trackListWindow != nullptr) { trackListWindow->ReloadTrackDesigns(); @@ -783,7 +783,7 @@ namespace OpenRCT2::Ui::Windows void WindowTrackDesignListSetBeingUpdated(const bool beingUpdated) { auto* windowMgr = GetWindowManager(); - auto* trackListWindow = static_cast(windowMgr->FindByClass(WindowClass::TrackDesignList)); + auto* trackListWindow = static_cast(windowMgr->FindByClass(WindowClass::trackDesignList)); if (trackListWindow != nullptr) { trackListWindow->SetIsBeingUpdated(beingUpdated); diff --git a/src/openrct2-ui/windows/Transparency.cpp b/src/openrct2-ui/windows/Transparency.cpp index fbbfc9cca0..443f55a40f 100644 --- a/src/openrct2-ui/windows/Transparency.cpp +++ b/src/openrct2-ui/windows/Transparency.cpp @@ -243,9 +243,9 @@ namespace OpenRCT2::Ui::Windows WindowBase* TransparencyOpen() { auto* windowMgr = GetWindowManager(); - auto* window = windowMgr->BringToFrontByClass(WindowClass::Transparency); + auto* window = windowMgr->BringToFrontByClass(WindowClass::transparency); if (window == nullptr) - window = windowMgr->Create(WindowClass::Transparency, ScreenCoordsXY(32, 32), kWindowSize); + window = windowMgr->Create(WindowClass::transparency, ScreenCoordsXY(32, 32), kWindowSize); return window; } diff --git a/src/openrct2-ui/windows/ViewClipping.cpp b/src/openrct2-ui/windows/ViewClipping.cpp index 93becbbee3..cabcc7ec54 100644 --- a/src/openrct2-ui/windows/ViewClipping.cpp +++ b/src/openrct2-ui/windows/ViewClipping.cpp @@ -407,17 +407,17 @@ namespace OpenRCT2::Ui::Windows bool IsActive() { - return isToolActive(WindowClass::ViewClipping); + return isToolActive(WindowClass::viewClipping); } }; WindowBase* ViewClippingOpen() { auto* windowMgr = GetWindowManager(); - auto* window = windowMgr->BringToFrontByClass(WindowClass::ViewClipping); + auto* window = windowMgr->BringToFrontByClass(WindowClass::viewClipping); if (window == nullptr) { - window = windowMgr->Create(WindowClass::ViewClipping, ScreenCoordsXY(32, 32), kWindowSize); + window = windowMgr->Create(WindowClass::viewClipping, ScreenCoordsXY(32, 32), kWindowSize); } return window; } diff --git a/src/openrct2-ui/windows/Viewport.cpp b/src/openrct2-ui/windows/Viewport.cpp index e93822007d..6797931c19 100644 --- a/src/openrct2-ui/windows/Viewport.cpp +++ b/src/openrct2-ui/windows/Viewport.cpp @@ -61,7 +61,7 @@ namespace OpenRCT2::Ui::Windows { number = 1; WindowVisitEach([&](WindowBase* w) { - if (w != nullptr && w != this && w->classification == WindowClass::Viewport) + if (w != nullptr && w != this && w->classification == WindowClass::viewport) { if (w->number >= number) number = w->number + 1; @@ -207,6 +207,6 @@ namespace OpenRCT2::Ui::Windows WindowBase* ViewportOpen() { - return GetWindowManager()->Create(WindowClass::Viewport, kWindowSize, WF_RESIZABLE); + return GetWindowManager()->Create(WindowClass::viewport, kWindowSize, WF_RESIZABLE); } } // namespace OpenRCT2::Ui::Windows diff --git a/src/openrct2-ui/windows/Water.cpp b/src/openrct2-ui/windows/Water.cpp index 8606d9065b..24a09f8052 100644 --- a/src/openrct2-ui/windows/Water.cpp +++ b/src/openrct2-ui/windows/Water.cpp @@ -69,7 +69,7 @@ namespace OpenRCT2::Ui::Windows void onClose() override { // If the tool wasn't changed, turn tool off - if (isToolActive(WindowClass::Water, WIDX_BACKGROUND)) + if (isToolActive(WindowClass::water, WIDX_BACKGROUND)) { ToolCancel(); } @@ -112,7 +112,7 @@ namespace OpenRCT2::Ui::Windows void onUpdate() override { // Close window if another tool is open - if (!isToolActive(WindowClass::Water, WIDX_BACKGROUND)) + if (!isToolActive(WindowClass::water, WIDX_BACKGROUND)) { close(); } @@ -320,7 +320,7 @@ namespace OpenRCT2::Ui::Windows { _waterToolRaiseCost = raiseCost; _waterToolLowerCost = lowerCost; - windowMgr->InvalidateByClass(WindowClass::Water); + windowMgr->InvalidateByClass(WindowClass::water); } return; } @@ -336,7 +336,7 @@ namespace OpenRCT2::Ui::Windows { _waterToolRaiseCost = kMoney64Undefined; _waterToolLowerCost = kMoney64Undefined; - windowMgr->InvalidateByClass(WindowClass::Water); + windowMgr->InvalidateByClass(WindowClass::water); } return; } @@ -411,7 +411,7 @@ namespace OpenRCT2::Ui::Windows { _waterToolRaiseCost = raiseCost; _waterToolLowerCost = lowerCost; - windowMgr->InvalidateByClass(WindowClass::Water); + windowMgr->InvalidateByClass(WindowClass::water); } } @@ -429,7 +429,7 @@ namespace OpenRCT2::Ui::Windows { auto* windowMgr = GetWindowManager(); return windowMgr->FocusOrCreate( - WindowClass::Water, ScreenCoordsXY(ContextGetWidth() - kWindowSize.width, 29), kWindowSize, 0); + WindowClass::water, ScreenCoordsXY(ContextGetWidth() - kWindowSize.width, 29), kWindowSize, 0); } /** @@ -438,14 +438,14 @@ namespace OpenRCT2::Ui::Windows */ void ToggleWaterWindow() { - if (isToolActive(WindowClass::Water, WIDX_BACKGROUND)) + if (isToolActive(WindowClass::water, WIDX_BACKGROUND)) { ToolCancel(); } else { ShowGridlines(); - auto* toolWindow = ContextOpenWindow(WindowClass::Water); + auto* toolWindow = ContextOpenWindow(WindowClass::water); ToolSet(*toolWindow, WIDX_BACKGROUND, Tool::waterDown); gInputFlags.set(InputFlag::unk6); } diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index a0cde2667c..af69bb700e 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -396,7 +396,7 @@ namespace OpenRCT2 void Quit() override { gSavePromptMode = PromptMode::quit; - ContextOpenWindow(WindowClass::SavePrompt); + ContextOpenWindow(WindowClass::savePrompt); } bool Initialise() final override @@ -706,7 +706,7 @@ namespace OpenRCT2 { _uiContext->ProcessMessages(); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::ProgressWindow); + windowMgr->InvalidateByClass(WindowClass::progressWindow); Draw(); } } @@ -914,7 +914,7 @@ namespace OpenRCT2 } // The path needs to be duplicated as it's a const here // which the window function doesn't like - auto intent = Intent(WindowClass::ObjectLoadError); + auto intent = Intent(WindowClass::objectLoadError); intent.PutExtra(INTENT_EXTRA_PATH, path); intent.PutExtra(INTENT_EXTRA_LIST, const_cast(e.MissingObjects.data())); intent.PutExtra(INTENT_EXTRA_LIST_COUNT, static_cast(e.MissingObjects.size())); diff --git a/src/openrct2/Editor.cpp b/src/openrct2/Editor.cpp index f2607ae00e..7f5fcd7b31 100644 --- a/src/openrct2/Editor.cpp +++ b/src/openrct2/Editor.cpp @@ -93,8 +93,8 @@ namespace OpenRCT2::Editor static WindowBase* OpenEditorWindows() { - auto* main = ContextOpenWindow(WindowClass::MainWindow); - ContextOpenWindow(WindowClass::TopToolbar); + auto* main = ContextOpenWindow(WindowClass::mainWindow); + ContextOpenWindow(WindowClass::topToolbar); ContextOpenWindowView(WV_EDITOR_BOTTOM_TOOLBAR); return main; } @@ -135,7 +135,7 @@ namespace OpenRCT2::Editor void ConvertSaveToScenario() { ToolCancel(); - auto intent = Intent(WindowClass::Loadsave); + auto intent = Intent(WindowClass::loadsave); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::load); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::park); intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(ConvertSaveToScenarioCallback)); @@ -360,12 +360,12 @@ namespace OpenRCT2::Editor switch (getGameState().editorStep) { case EditorStep::ObjectSelection: - if (windowMgr->FindByClass(WindowClass::EditorObjectSelection) != nullptr) + if (windowMgr->FindByClass(WindowClass::editorObjectSelection) != nullptr) { return; } - if (windowMgr->FindByClass(WindowClass::InstallTrack) != nullptr) + if (windowMgr->FindByClass(WindowClass::installTrack) != nullptr) { return; } @@ -375,25 +375,25 @@ namespace OpenRCT2::Editor ObjectManagerUnloadAllObjects(); } - ContextOpenWindow(WindowClass::EditorObjectSelection); + ContextOpenWindow(WindowClass::editorObjectSelection); break; case EditorStep::InventionsListSetUp: - if (windowMgr->FindByClass(WindowClass::EditorInventionList) != nullptr) + if (windowMgr->FindByClass(WindowClass::editorInventionList) != nullptr) { return; } - ContextOpenWindow(WindowClass::EditorInventionList); + ContextOpenWindow(WindowClass::editorInventionList); break; case EditorStep::OptionsSelection: case EditorStep::ObjectiveSelection: case EditorStep::ScenarioDetails: - if (windowMgr->FindByClass(WindowClass::EditorScenarioOptions) != nullptr) + if (windowMgr->FindByClass(WindowClass::editorScenarioOptions) != nullptr) { return; } - ContextOpenWindow(WindowClass::EditorScenarioOptions); + ContextOpenWindow(WindowClass::editorScenarioOptions); break; case EditorStep::LandscapeEditor: case EditorStep::SaveScenario: diff --git a/src/openrct2/Game.cpp b/src/openrct2/Game.cpp index f4427d097a..ee57674a09 100644 --- a/src/openrct2/Game.cpp +++ b/src/openrct2/Game.cpp @@ -139,9 +139,9 @@ void GameReduceGameSpeed() */ void GameCreateWindows() { - ContextOpenWindow(WindowClass::MainWindow); - ContextOpenWindow(WindowClass::TopToolbar); - ContextOpenWindow(WindowClass::BottomToolbar); + ContextOpenWindow(WindowClass::mainWindow); + ContextOpenWindow(WindowClass::topToolbar); + ContextOpenWindow(WindowClass::bottomToolbar); WindowResizeGui(ContextGetWidth(), ContextGetHeight()); } @@ -150,7 +150,7 @@ void PauseToggle() gGamePaused ^= GAME_PAUSED_NORMAL; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::TopToolbar); + windowMgr->InvalidateByClass(WindowClass::topToolbar); if (gGamePaused & GAME_PAUSED_NORMAL) { @@ -174,7 +174,7 @@ bool GameIsNotPaused() */ static void LoadLandscape() { - auto intent = Intent(WindowClass::Loadsave); + auto intent = Intent(WindowClass::loadsave); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::load); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::landscape); ContextOpenIntent(&intent); @@ -511,7 +511,7 @@ std::unique_ptr CreateSaveGameAsIntent() { auto name = Path::GetFileNameWithoutExtension(gScenarioSavePath); - auto intent = std::make_unique(WindowClass::Loadsave); + auto intent = std::make_unique(WindowClass::loadsave); intent->PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::save); intent->PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::park); intent->PutExtra(INTENT_EXTRA_PATH, name); @@ -647,7 +647,7 @@ static void GameLoadOrQuitNoSavePromptCallback(ModalResult result, const utf8* p GameUnloadScripts(); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::EditorObjectSelection); + windowMgr->CloseByClass(WindowClass::editorObjectSelection); GameLoadScripts(); GameNotifyMapChanged(); @@ -661,8 +661,8 @@ static void NewGameWindowCallback(const utf8* path) // Closing this will cause a Ride window to pop up, so we have to do this to ensure that // no windows are open (besides the toolbars and LoadSave window). auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::RideConstruction); - windowMgr->CloseAllExceptClass(WindowClass::Loadsave); + windowMgr->CloseByClass(WindowClass::rideConstruction); + windowMgr->CloseAllExceptClass(WindowClass::loadsave); GameNotifyMapChange(); GetContext()->LoadParkFromFile(path, false, true); @@ -694,7 +694,7 @@ void GameLoadOrQuitNoSavePrompt() } else { - auto intent = Intent(WindowClass::Loadsave); + auto intent = Intent(WindowClass::loadsave); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_ACTION, LoadSaveAction::load); intent.PutEnumExtra(INTENT_EXTRA_LOADSAVE_TYPE, LoadSaveType::park); intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(GameLoadOrQuitNoSavePromptCallback)); @@ -728,7 +728,7 @@ void GameLoadOrQuitNoSavePrompt() auto loadOrQuitAction = GameActions::LoadOrQuitAction(GameActions::LoadOrQuitModes::CloseSavePrompt); GameActions::Execute(&loadOrQuitAction, gameState); ToolCancel(); - auto intent = Intent(WindowClass::ScenarioSelect); + auto intent = Intent(WindowClass::scenarioSelect); intent.PutExtra(INTENT_EXTRA_CALLBACK, reinterpret_cast(NewGameWindowCallback)); ContextOpenIntent(&intent); break; diff --git a/src/openrct2/actions/CheatSetAction.cpp b/src/openrct2/actions/CheatSetAction.cpp index 2f72bdffb4..07b274ddd0 100644 --- a/src/openrct2/actions/CheatSetAction.cpp +++ b/src/openrct2/actions/CheatSetAction.cpp @@ -110,13 +110,13 @@ namespace OpenRCT2::GameActions { case CheatType::SandboxMode: gameState.cheats.sandboxMode = _param1 != 0; - windowMgr->InvalidateByClass(WindowClass::Map); - windowMgr->InvalidateByClass(WindowClass::Footpath); + windowMgr->InvalidateByClass(WindowClass::map); + windowMgr->InvalidateByClass(WindowClass::footpath); break; case CheatType::DisableClearanceChecks: gameState.cheats.disableClearanceChecks = _param1 != 0; // Required to update the clearance checks overlay on the Cheats button. - windowMgr->InvalidateByClass(WindowClass::TopToolbar); + windowMgr->InvalidateByClass(WindowClass::topToolbar); break; case CheatType::DisableSupportLimits: gameState.cheats.disableSupportLimits = _param1 != 0; @@ -204,7 +204,7 @@ namespace OpenRCT2::GameActions break; case CheatType::MakeDestructible: gameState.cheats.makeAllDestructible = _param1 != 0; - windowMgr->InvalidateByClass(WindowClass::Ride); + windowMgr->InvalidateByClass(WindowClass::ride); break; case CheatType::FixRides: FixBrokenRides(gameState); @@ -239,7 +239,7 @@ namespace OpenRCT2::GameActions break; case CheatType::AllowArbitraryRideTypeChanges: gameState.cheats.allowArbitraryRideTypeChanges = _param1 != 0; - windowMgr->InvalidateByClass(WindowClass::Ride); + windowMgr->InvalidateByClass(WindowClass::ride); break; case CheatType::OwnAllLand: OwnAllLand(); @@ -283,7 +283,7 @@ namespace OpenRCT2::GameActions Config::Save(); } - windowMgr->InvalidateByClass(WindowClass::Cheats); + windowMgr->InvalidateByClass(WindowClass::cheats); return Result(); } @@ -554,7 +554,7 @@ namespace OpenRCT2::GameActions ride.renew(); } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::Ride); + windowMgr->InvalidateByClass(WindowClass::ride); } void CheatSetAction::ResetRideCrashStatus(GameState_t& gameState) const @@ -566,7 +566,7 @@ namespace OpenRCT2::GameActions ride.lastCrashType = RIDE_CRASH_TYPE_NONE; } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::Ride); + windowMgr->InvalidateByClass(WindowClass::ride); } void CheatSetAction::Set10MinuteInspection(GameState_t& gameState) const @@ -577,7 +577,7 @@ namespace OpenRCT2::GameActions ride.inspectionInterval = RIDE_INSPECTION_EVERY_10_MINUTES; } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::Ride); + windowMgr->InvalidateByClass(WindowClass::ride); } void CheatSetAction::SetScenarioNoMoney(GameState_t& gameState, bool enabled) const @@ -594,13 +594,13 @@ namespace OpenRCT2::GameActions // Invalidate all windows that have anything to do with finance auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::Ride); - windowMgr->InvalidateByClass(WindowClass::Peep); - windowMgr->InvalidateByClass(WindowClass::ParkInformation); - windowMgr->InvalidateByClass(WindowClass::Finances); - windowMgr->InvalidateByClass(WindowClass::BottomToolbar); - windowMgr->InvalidateByClass(WindowClass::TopToolbar); - windowMgr->InvalidateByClass(WindowClass::Cheats); + windowMgr->InvalidateByClass(WindowClass::ride); + windowMgr->InvalidateByClass(WindowClass::peep); + windowMgr->InvalidateByClass(WindowClass::parkInformation); + windowMgr->InvalidateByClass(WindowClass::finances); + windowMgr->InvalidateByClass(WindowClass::bottomToolbar); + windowMgr->InvalidateByClass(WindowClass::topToolbar); + windowMgr->InvalidateByClass(WindowClass::cheats); } void CheatSetAction::SetMoney(money64 amount) const @@ -608,8 +608,8 @@ namespace OpenRCT2::GameActions getGameState().park.cash = amount; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::Finances); - windowMgr->InvalidateByClass(WindowClass::BottomToolbar); + windowMgr->InvalidateByClass(WindowClass::finances); + windowMgr->InvalidateByClass(WindowClass::bottomToolbar); } void CheatSetAction::AddMoney(money64 amount) const @@ -618,8 +618,8 @@ namespace OpenRCT2::GameActions park.cash = AddClamp(park.cash, amount); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::Finances); - windowMgr->InvalidateByClass(WindowClass::BottomToolbar); + windowMgr->InvalidateByClass(WindowClass::finances); + windowMgr->InvalidateByClass(WindowClass::bottomToolbar); } void CheatSetAction::ClearLoan(GameState_t& gameState) const @@ -640,7 +640,7 @@ namespace OpenRCT2::GameActions } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::BottomToolbar); + windowMgr->InvalidateByClass(WindowClass::bottomToolbar); } void CheatSetAction::SetGuestParameter(int32_t parameter, int32_t value) const @@ -713,7 +713,7 @@ namespace OpenRCT2::GameActions } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::Peep); + windowMgr->InvalidateByClass(WindowClass::peep); } void CheatSetAction::RemoveAllGuests(GameState_t& gameState) const @@ -772,7 +772,7 @@ namespace OpenRCT2::GameActions } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::Ride); + windowMgr->InvalidateByClass(WindowClass::ride); GfxInvalidateScreen(); } diff --git a/src/openrct2/actions/GameSetSpeedAction.cpp b/src/openrct2/actions/GameSetSpeedAction.cpp index c792416923..b64f9b179a 100644 --- a/src/openrct2/actions/GameSetSpeedAction.cpp +++ b/src/openrct2/actions/GameSetSpeedAction.cpp @@ -63,7 +63,7 @@ namespace OpenRCT2::GameActions gGameSpeed = _speed; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::TopToolbar); + windowMgr->InvalidateByClass(WindowClass::topToolbar); return res; } diff --git a/src/openrct2/actions/LoadOrQuitAction.cpp b/src/openrct2/actions/LoadOrQuitAction.cpp index b77186a896..9c978305dd 100644 --- a/src/openrct2/actions/LoadOrQuitAction.cpp +++ b/src/openrct2/actions/LoadOrQuitAction.cpp @@ -51,12 +51,12 @@ namespace OpenRCT2::GameActions { case LoadOrQuitModes::OpenSavePrompt: gSavePromptMode = _savePromptMode; - ContextOpenWindow(WindowClass::SavePrompt); + ContextOpenWindow(WindowClass::savePrompt); break; case LoadOrQuitModes::CloseSavePrompt: { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::SavePrompt); + windowMgr->CloseByClass(WindowClass::savePrompt); break; } default: diff --git a/src/openrct2/actions/ParkSetEntranceFeeAction.cpp b/src/openrct2/actions/ParkSetEntranceFeeAction.cpp index 26cd75ebda..02f6bd76a5 100644 --- a/src/openrct2/actions/ParkSetEntranceFeeAction.cpp +++ b/src/openrct2/actions/ParkSetEntranceFeeAction.cpp @@ -67,7 +67,7 @@ namespace OpenRCT2::GameActions getGameState().park.entranceFee = _fee; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::ParkInformation); + windowMgr->InvalidateByClass(WindowClass::parkInformation); return Result(); } diff --git a/src/openrct2/actions/ParkSetParameterAction.cpp b/src/openrct2/actions/ParkSetParameterAction.cpp index 2fd80bc9eb..8a6b5df475 100644 --- a/src/openrct2/actions/ParkSetParameterAction.cpp +++ b/src/openrct2/actions/ParkSetParameterAction.cpp @@ -65,19 +65,19 @@ namespace OpenRCT2::GameActions if (park.flags & PARK_FLAGS_PARK_OPEN) { park.flags &= ~PARK_FLAGS_PARK_OPEN; - windowMgr->InvalidateByClass(WindowClass::ParkInformation); + windowMgr->InvalidateByClass(WindowClass::parkInformation); } break; case ParkParameter::Open: if (!(park.flags & PARK_FLAGS_PARK_OPEN)) { park.flags |= PARK_FLAGS_PARK_OPEN; - windowMgr->InvalidateByClass(WindowClass::ParkInformation); + windowMgr->InvalidateByClass(WindowClass::parkInformation); } break; case ParkParameter::SamePriceInPark: park.samePriceThroughoutPark = _value; - windowMgr->InvalidateByClass(WindowClass::Ride); + windowMgr->InvalidateByClass(WindowClass::ride); break; default: LOG_ERROR("Invalid park parameter %d", _parameter); diff --git a/src/openrct2/actions/RideCreateAction.cpp b/src/openrct2/actions/RideCreateAction.cpp index f8799dc07c..68641f2124 100644 --- a/src/openrct2/actions/RideCreateAction.cpp +++ b/src/openrct2/actions/RideCreateAction.cpp @@ -292,7 +292,7 @@ namespace OpenRCT2::GameActions RideSetVehicleColoursToRandomPreset(*ride, _colour2); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::RideList); + windowMgr->InvalidateByClass(WindowClass::rideList); res.Expenditure = ExpenditureType::rideConstruction; res.SetData(RideId{ rideIndex }); diff --git a/src/openrct2/actions/RideDemolishAction.cpp b/src/openrct2/actions/RideDemolishAction.cpp index 71c9057a62..f511324130 100644 --- a/src/openrct2/actions/RideDemolishAction.cpp +++ b/src/openrct2/actions/RideDemolishAction.cpp @@ -161,10 +161,10 @@ namespace OpenRCT2::GameActions // Close windows related to the demolished ride auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByNumber(WindowClass::RideConstruction, rideId.ToUnderlying()); - windowMgr->CloseByNumber(WindowClass::Ride, rideId.ToUnderlying()); - windowMgr->CloseByNumber(WindowClass::DemolishRidePrompt, rideId.ToUnderlying()); - windowMgr->CloseByClass(WindowClass::NewCampaign); + windowMgr->CloseByNumber(WindowClass::rideConstruction, rideId.ToUnderlying()); + windowMgr->CloseByNumber(WindowClass::ride, rideId.ToUnderlying()); + windowMgr->CloseByNumber(WindowClass::demolishRidePrompt, rideId.ToUnderlying()); + windowMgr->CloseByClass(WindowClass::newCampaign); // Refresh windows that display the ride name windowMgr->BroadcastIntent(Intent(INTENT_ACTION_REFRESH_CAMPAIGN_RIDE_LIST)); @@ -288,7 +288,7 @@ namespace OpenRCT2::GameActions } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByNumber(WindowClass::DemolishRidePrompt, _rideIndex.ToUnderlying()); + windowMgr->CloseByNumber(WindowClass::demolishRidePrompt, _rideIndex.ToUnderlying()); return res; } diff --git a/src/openrct2/actions/RideFreezeRatingAction.cpp b/src/openrct2/actions/RideFreezeRatingAction.cpp index cccf5f6fc3..9d4d9ed9e4 100644 --- a/src/openrct2/actions/RideFreezeRatingAction.cpp +++ b/src/openrct2/actions/RideFreezeRatingAction.cpp @@ -72,7 +72,7 @@ namespace OpenRCT2::GameActions ride->lifecycleFlags |= RIDE_LIFECYCLE_FIXED_RATINGS; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Ride, _rideIndex.ToUnderlying()); + windowMgr->InvalidateByNumber(WindowClass::ride, _rideIndex.ToUnderlying()); auto res = Result(); return res; diff --git a/src/openrct2/actions/RideSetAppearanceAction.cpp b/src/openrct2/actions/RideSetAppearanceAction.cpp index 7e78860bfc..370d252185 100644 --- a/src/openrct2/actions/RideSetAppearanceAction.cpp +++ b/src/openrct2/actions/RideSetAppearanceAction.cpp @@ -149,7 +149,7 @@ namespace OpenRCT2::GameActions } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Ride, _rideIndex.ToUnderlying()); + windowMgr->InvalidateByNumber(WindowClass::ride, _rideIndex.ToUnderlying()); auto res = GameActions::Result(); if (!ride->overallView.IsNull()) diff --git a/src/openrct2/actions/RideSetPriceAction.cpp b/src/openrct2/actions/RideSetPriceAction.cpp index 098f23f666..497bbfae42 100644 --- a/src/openrct2/actions/RideSetPriceAction.cpp +++ b/src/openrct2/actions/RideSetPriceAction.cpp @@ -120,7 +120,7 @@ namespace OpenRCT2::GameActions if (shopItem == ShopItem::None) { ride->price[0] = _price; - windowMgr->InvalidateByClass(WindowClass::Ride); + windowMgr->InvalidateByClass(WindowClass::ride); return res; } } @@ -128,7 +128,7 @@ namespace OpenRCT2::GameActions if (!ShopItemHasCommonPrice(shopItem)) { ride->price[0] = _price; - windowMgr->InvalidateByClass(WindowClass::Ride); + windowMgr->InvalidateByClass(WindowClass::ride); return res; } } @@ -141,7 +141,7 @@ namespace OpenRCT2::GameActions if ((ride->lifecycleFlags & RIDE_LIFECYCLE_ON_RIDE_PHOTO) == 0) { ride->price[1] = _price; - windowMgr->InvalidateByClass(WindowClass::Ride); + windowMgr->InvalidateByClass(WindowClass::ride); return res; } } @@ -149,7 +149,7 @@ namespace OpenRCT2::GameActions if (!ShopItemHasCommonPrice(shopItem)) { ride->price[1] = _price; - windowMgr->InvalidateByClass(WindowClass::Ride); + windowMgr->InvalidateByClass(WindowClass::ride); return res; } } @@ -199,7 +199,7 @@ namespace OpenRCT2::GameActions if (invalidate) { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Ride, ride.id.ToUnderlying()); + windowMgr->InvalidateByNumber(WindowClass::ride, ride.id.ToUnderlying()); } } } diff --git a/src/openrct2/actions/RideSetSettingAction.cpp b/src/openrct2/actions/RideSetSettingAction.cpp index 0ce7b0c4fd..52b04dbe29 100644 --- a/src/openrct2/actions/RideSetSettingAction.cpp +++ b/src/openrct2/actions/RideSetSettingAction.cpp @@ -241,7 +241,7 @@ namespace OpenRCT2::GameActions res.Position = { location, TileElementHeight(location) }; } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Ride, _rideIndex.ToUnderlying()); + windowMgr->InvalidateByNumber(WindowClass::ride, _rideIndex.ToUnderlying()); return res; } diff --git a/src/openrct2/actions/RideSetStatusAction.cpp b/src/openrct2/actions/RideSetStatusAction.cpp index 48b3bc049f..0826a1ff5d 100644 --- a/src/openrct2/actions/RideSetStatusAction.cpp +++ b/src/openrct2/actions/RideSetStatusAction.cpp @@ -161,7 +161,7 @@ namespace OpenRCT2::GameActions ride->lifecycleFlags &= ~RIDE_LIFECYCLE_PASS_STATION_NO_STOPPING; ride->raceWinner = EntityId::GetNull(); ride->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; - windowMgr->InvalidateByNumber(WindowClass::Ride, _rideIndex.ToUnderlying()); + windowMgr->InvalidateByNumber(WindowClass::ride, _rideIndex.ToUnderlying()); break; case RideStatus::simulating: { @@ -184,7 +184,7 @@ namespace OpenRCT2::GameActions ride->lastIssueTime = 0; ride->getMeasurement(); ride->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; - windowMgr->InvalidateByNumber(WindowClass::Ride, _rideIndex.ToUnderlying()); + windowMgr->InvalidateByNumber(WindowClass::ride, _rideIndex.ToUnderlying()); break; } case RideStatus::testing: @@ -204,7 +204,7 @@ namespace OpenRCT2::GameActions // 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) WindowBase* constructionWindow = windowMgr->FindByNumber( - WindowClass::RideConstruction, _rideIndex.ToUnderlying()); + WindowClass::rideConstruction, _rideIndex.ToUnderlying()); if (constructionWindow != nullptr) { windowMgr->Close(*constructionWindow); @@ -237,7 +237,7 @@ namespace OpenRCT2::GameActions ride->lastIssueTime = 0; ride->getMeasurement(); ride->windowInvalidateFlags |= RIDE_INVALIDATE_RIDE_MAIN | RIDE_INVALIDATE_RIDE_LIST; - windowMgr->InvalidateByNumber(WindowClass::Ride, _rideIndex.ToUnderlying()); + windowMgr->InvalidateByNumber(WindowClass::ride, _rideIndex.ToUnderlying()); break; } default: diff --git a/src/openrct2/actions/ScenarioSetSettingAction.cpp b/src/openrct2/actions/ScenarioSetSettingAction.cpp index b6b7746d22..ce56096c33 100644 --- a/src/openrct2/actions/ScenarioSetSettingAction.cpp +++ b/src/openrct2/actions/ScenarioSetSettingAction.cpp @@ -73,33 +73,33 @@ namespace OpenRCT2::GameActions gameState.park.flags &= ~PARK_FLAGS_NO_MONEY; } // Invalidate all windows that have anything to do with finance - windowMgr->InvalidateByClass(WindowClass::Ride); - windowMgr->InvalidateByClass(WindowClass::Peep); - windowMgr->InvalidateByClass(WindowClass::ParkInformation); - windowMgr->InvalidateByClass(WindowClass::Finances); - windowMgr->InvalidateByClass(WindowClass::BottomToolbar); - windowMgr->InvalidateByClass(WindowClass::TopToolbar); + windowMgr->InvalidateByClass(WindowClass::ride); + windowMgr->InvalidateByClass(WindowClass::peep); + windowMgr->InvalidateByClass(WindowClass::parkInformation); + windowMgr->InvalidateByClass(WindowClass::finances); + windowMgr->InvalidateByClass(WindowClass::bottomToolbar); + windowMgr->InvalidateByClass(WindowClass::topToolbar); } break; case ScenarioSetSetting::InitialCash: gameState.scenarioOptions.initialCash = std::clamp(_value, 0.00_GBP, 1000000.00_GBP); gameState.park.cash = gameState.scenarioOptions.initialCash; - windowMgr->InvalidateByClass(WindowClass::Finances); - windowMgr->InvalidateByClass(WindowClass::BottomToolbar); + windowMgr->InvalidateByClass(WindowClass::finances); + windowMgr->InvalidateByClass(WindowClass::bottomToolbar); break; case ScenarioSetSetting::InitialLoan: gameState.park.bankLoan = std::clamp(_value, 0.00_GBP, 5000000.00_GBP); gameState.park.maxBankLoan = std::max(gameState.park.bankLoan, gameState.park.maxBankLoan); - windowMgr->InvalidateByClass(WindowClass::Finances); + windowMgr->InvalidateByClass(WindowClass::finances); break; case ScenarioSetSetting::MaximumLoanSize: gameState.park.maxBankLoan = std::clamp(_value, 0.00_GBP, 5000000.00_GBP); gameState.park.bankLoan = std::min(gameState.park.bankLoan, gameState.park.maxBankLoan); - windowMgr->InvalidateByClass(WindowClass::Finances); + windowMgr->InvalidateByClass(WindowClass::finances); break; case ScenarioSetSetting::AnnualInterestRate: gameState.park.bankLoanInterestRate = std::clamp(_value, 0, kMaxBankLoanInterestRate); - windowMgr->InvalidateByClass(WindowClass::Finances); + windowMgr->InvalidateByClass(WindowClass::finances); break; case ScenarioSetSetting::ForbidMarketingCampaigns: if (_value != 0) @@ -188,13 +188,13 @@ namespace OpenRCT2::GameActions gameState.park.flags |= PARK_FLAGS_PARK_FREE_ENTRY; gameState.park.flags |= PARK_FLAGS_UNLOCK_ALL_PRICES; } - windowMgr->InvalidateByClass(WindowClass::ParkInformation); - windowMgr->InvalidateByClass(WindowClass::Ride); + windowMgr->InvalidateByClass(WindowClass::parkInformation); + windowMgr->InvalidateByClass(WindowClass::ride); } break; case ScenarioSetSetting::ParkChargeEntryFee: gameState.park.entranceFee = std::clamp(_value, 0.00_GBP, kMaxEntranceFee); - windowMgr->InvalidateByClass(WindowClass::ParkInformation); + windowMgr->InvalidateByClass(WindowClass::parkInformation); break; case ScenarioSetSetting::ForbidTreeRemoval: if (_value != 0) @@ -265,7 +265,7 @@ namespace OpenRCT2::GameActions LOG_ERROR("Invalid scenario setting %u", _setting); return Result(Status::InvalidParameters, STR_ERR_INVALID_PARAMETER, STR_ERR_VALUE_OUT_OF_RANGE); } - windowMgr->InvalidateByClass(WindowClass::EditorScenarioOptions); + windowMgr->InvalidateByClass(WindowClass::editorScenarioOptions); return Result(); } } // namespace OpenRCT2::GameActions diff --git a/src/openrct2/actions/StaffFireAction.cpp b/src/openrct2/actions/StaffFireAction.cpp index 7d8767a556..621d089de3 100644 --- a/src/openrct2/actions/StaffFireAction.cpp +++ b/src/openrct2/actions/StaffFireAction.cpp @@ -75,7 +75,7 @@ namespace OpenRCT2::GameActions } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::FirePrompt); + windowMgr->CloseByClass(WindowClass::firePrompt); PeepEntityRemove(staff); // Due to patrol areas best to invalidate the whole screen on removal of staff diff --git a/src/openrct2/actions/StaffSetCostumeAction.cpp b/src/openrct2/actions/StaffSetCostumeAction.cpp index 7130f1faf8..e131b47bde 100644 --- a/src/openrct2/actions/StaffSetCostumeAction.cpp +++ b/src/openrct2/actions/StaffSetCostumeAction.cpp @@ -96,7 +96,7 @@ namespace OpenRCT2::GameActions staff->Invalidate(); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Peep, _spriteIndex); + windowMgr->InvalidateByNumber(WindowClass::peep, _spriteIndex); auto intent = Intent(INTENT_ACTION_REFRESH_STAFF_LIST); ContextBroadcastIntent(&intent); diff --git a/src/openrct2/actions/StaffSetOrdersAction.cpp b/src/openrct2/actions/StaffSetOrdersAction.cpp index 6330bbfe67..d79dab8c46 100644 --- a/src/openrct2/actions/StaffSetOrdersAction.cpp +++ b/src/openrct2/actions/StaffSetOrdersAction.cpp @@ -74,7 +74,7 @@ namespace OpenRCT2::GameActions staff->StaffOrders = _ordersId; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Peep, _spriteIndex); + windowMgr->InvalidateByNumber(WindowClass::peep, _spriteIndex); auto intent = Intent(INTENT_ACTION_REFRESH_STAFF_LIST); ContextBroadcastIntent(&intent); diff --git a/src/openrct2/audio/Audio.cpp b/src/openrct2/audio/Audio.cpp index 837306a49f..3081491dc1 100644 --- a/src/openrct2/audio/Audio.cpp +++ b/src/openrct2/audio/Audio.cpp @@ -415,7 +415,7 @@ namespace OpenRCT2::Audio } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::Options); + windowMgr->InvalidateByClass(WindowClass::options); } void Pause() diff --git a/src/openrct2/command_line/ConvertCommand.cpp b/src/openrct2/command_line/ConvertCommand.cpp index 9232610d26..0d6851c279 100644 --- a/src/openrct2/command_line/ConvertCommand.cpp +++ b/src/openrct2/command_line/ConvertCommand.cpp @@ -146,7 +146,7 @@ namespace OpenRCT2 // HACK remove the main window so it saves the park with the // correct initial view auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::MainWindow); + windowMgr->CloseByClass(WindowClass::mainWindow); exporter->Export(gameState, destinationPath, static_cast(_compressLevel)); } diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index e450430dba..5775f430a1 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -1462,14 +1462,14 @@ void Guest::CheckCantFindRide() GuestHeadingToRideId = RideId::GetNull(); auto* windowMgr = Ui::GetWindowManager(); - WindowBase* w = windowMgr->FindByNumber(WindowClass::Peep, Id); + WindowBase* w = windowMgr->FindByNumber(WindowClass::peep, Id); if (w != nullptr) { w->onPrepareDraw(); } - windowMgr->InvalidateByNumber(WindowClass::Peep, Id); + windowMgr->InvalidateByNumber(WindowClass::peep, Id); } /** @@ -2349,7 +2349,7 @@ void Guest::SpendMoney(money64& peep_expend_type, money64 amount, ExpenditureTyp peep_expend_type += amount; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Peep, Id); + windowMgr->InvalidateByNumber(WindowClass::peep, Id); FinancePayment(-amount, expenditure); @@ -3161,10 +3161,10 @@ static void GuestLeavePark(Guest& guest) guest.InsertNewThought(PeepThoughtType::GoHome); auto* windowMgr = Ui::GetWindowManager(); - WindowBase* w = windowMgr->FindByNumber(WindowClass::Peep, guest.Id); + WindowBase* w = windowMgr->FindByNumber(WindowClass::peep, guest.Id); if (w != nullptr) w->onPrepareDraw(); - windowMgr->InvalidateByNumber(WindowClass::Peep, guest.Id); + windowMgr->InvalidateByNumber(WindowClass::peep, guest.Id); } template @@ -3407,7 +3407,7 @@ void Guest::UpdateBuying() CashInPocket += 50.00_GBP; } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Peep, Id); + windowMgr->InvalidateByNumber(WindowClass::peep, Id); } Orientation ^= 0x10; @@ -3922,7 +3922,7 @@ void Guest::UpdateRideFreeVehicleEnterRide(Ride& ride) { station.QueueTime = queueTime; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Ride, CurrentRide.ToUnderlying()); + windowMgr->InvalidateByNumber(WindowClass::ride, CurrentRide.ToUnderlying()); } if (PeepFlags & PEEP_FLAGS_TRACKING) @@ -5923,7 +5923,7 @@ void Guest::UpdateLeavingPark() Var37 = 1; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::GuestList); + windowMgr->InvalidateByClass(WindowClass::guestList); const auto [pathingResult, _] = PerformNextAction(); if (!(pathingResult & PATHING_OUTSIDE_PARK)) diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index a5899e408b..5ad91435ba 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -571,7 +571,7 @@ void PeepDecrementNumRiders(Peep* peep) void PeepWindowStateUpdate(Peep* peep) { auto* windowMgr = Ui::GetWindowManager(); - WindowBase* w = windowMgr->FindByNumber(WindowClass::Peep, peep->Id.ToUnderlying()); + WindowBase* w = windowMgr->FindByNumber(WindowClass::peep, peep->Id.ToUnderlying()); if (w != nullptr) w->onPrepareDraw(); @@ -587,13 +587,13 @@ void PeepWindowStateUpdate(Peep* peep) } } - windowMgr->InvalidateByNumber(WindowClass::Peep, peep->Id); - windowMgr->InvalidateByClass(WindowClass::GuestList); + windowMgr->InvalidateByNumber(WindowClass::peep, peep->Id); + windowMgr->InvalidateByClass(WindowClass::guestList); } else { - windowMgr->InvalidateByNumber(WindowClass::Peep, peep->Id); - windowMgr->InvalidateByClass(WindowClass::StaffList); + windowMgr->InvalidateByNumber(WindowClass::peep, peep->Id); + windowMgr->InvalidateByClass(WindowClass::staffList); } } @@ -698,8 +698,8 @@ void PeepEntityRemove(Peep* peep) peep->Invalidate(); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByNumber(WindowClass::Peep, peep->Id); - windowMgr->CloseByNumber(WindowClass::FirePrompt, EnumValue(peep->Type)); + windowMgr->CloseByNumber(WindowClass::peep, peep->Id); + windowMgr->CloseByNumber(WindowClass::firePrompt, EnumValue(peep->Type)); auto* staff = peep->As(); // Needed for invalidations after sprite removal @@ -1886,7 +1886,7 @@ static bool PeepInteractWithEntrance(Peep* peep, const CoordsXYE& coords, uint8_ getGameState().park.totalAdmissions++; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::ParkInformation, 0); + windowMgr->InvalidateByNumber(WindowClass::parkInformation, 0); guest->Var37 = 1; auto destination = guest->GetDestination(); diff --git a/src/openrct2/interface/InteractiveConsole.cpp b/src/openrct2/interface/InteractiveConsole.cpp index 7819f183df..c72ea7c81f 100644 --- a/src/openrct2/interface/InteractiveConsole.cpp +++ b/src/openrct2/interface/InteractiveConsole.cpp @@ -1187,7 +1187,7 @@ static void ConsoleCommandOpen(InteractiveConsole& console, const arguments_t& a // Only this window should be open for safety reasons auto* windowMgr = Ui::GetWindowManager(); windowMgr->CloseAll(); - ContextOpenWindow(WindowClass::EditorObjectSelection); + ContextOpenWindow(WindowClass::editorObjectSelection); } } else if (argv[0] == "inventions_list" && InvalidArguments(&invalidTitle, !title)) @@ -1198,20 +1198,20 @@ static void ConsoleCommandOpen(InteractiveConsole& console, const arguments_t& a } else { - ContextOpenWindow(WindowClass::EditorInventionList); + ContextOpenWindow(WindowClass::editorInventionList); } } else if (argv[0] == "scenario_options" && InvalidArguments(&invalidTitle, !title)) { - ContextOpenWindow(WindowClass::EditorScenarioOptions); + ContextOpenWindow(WindowClass::editorScenarioOptions); } else if (argv[0] == "options") { - ContextOpenWindow(WindowClass::Options); + ContextOpenWindow(WindowClass::options); } else if (argv[0] == "themes") { - ContextOpenWindow(WindowClass::Themes); + ContextOpenWindow(WindowClass::themes); } else if (invalidTitle) { @@ -1312,7 +1312,7 @@ static void ConsoleCommandForceDate([[maybe_unused]] InteractiveConsole& console GameActions::Execute(&setDateAction, getGameState()); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::BottomToolbar); + windowMgr->InvalidateByClass(WindowClass::bottomToolbar); } static void ConsoleCommandLoadPark([[maybe_unused]] InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv) diff --git a/src/openrct2/interface/Viewport.cpp b/src/openrct2/interface/Viewport.cpp index d8ecb0b49f..18edd02e86 100644 --- a/src/openrct2/interface/Viewport.cpp +++ b/src/openrct2/interface/Viewport.cpp @@ -105,7 +105,7 @@ namespace OpenRCT2 // ? gInputFlags.clearAll(); InputSetState(InputState::Reset); - gPressedWidget.windowClassification = WindowClass::Null; + gPressedWidget.windowClassification = WindowClass::null; gPickupPeepImage = ImageId(); ResetTooltipNotShown(); gMapSelectFlags.clearAll(); @@ -531,8 +531,8 @@ namespace OpenRCT2 // rct2: 0x006E7A15 static void ViewportSetUndergroundFlag(int32_t underground, WindowBase* window, Viewport* viewport) { - if ((window->classification != WindowClass::MainWindow && window->classification != WindowClass::Viewport) - || (window->classification == WindowClass::MainWindow && !window->viewportSmartFollowSprite.IsNull())) + if ((window->classification != WindowClass::mainWindow && window->classification != WindowClass::viewport) + || (window->classification == WindowClass::mainWindow && !window->viewportSmartFollowSprite.IsNull())) { if (!underground) { diff --git a/src/openrct2/interface/Window.cpp b/src/openrct2/interface/Window.cpp index c33966cd85..6cba6c6406 100644 --- a/src/openrct2/interface/Window.cpp +++ b/src/openrct2/interface/Window.cpp @@ -41,7 +41,7 @@ namespace OpenRCT2 std::vector> gWindowList; WindowBase* gWindowAudioExclusive; - WindowCloseModifier gLastCloseModifier = { { WindowClass::Null, 0 }, CloseWindowModifier::none }; + WindowCloseModifier gLastCloseModifier = { { WindowClass::null, 0 }, CloseWindowModifier::none }; uint32_t gWindowUpdateTicks; colour_t gCurrentWindowColours[3]; @@ -135,7 +135,7 @@ static constexpr float kWindowScrollLocations[][2] = { window.isVisible = true; continue; } - if (window.classification == WindowClass::MainWindow) + if (window.classification == WindowClass::mainWindow) { window.isVisible = true; window.viewport->isVisible = true; @@ -217,7 +217,7 @@ static constexpr float kWindowScrollLocations[][2] = { if (val < prev) { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseSurplus(val, WindowClass::Options); + windowMgr->CloseSurplus(val, WindowClass::options); } } @@ -314,7 +314,7 @@ static constexpr float kWindowScrollLocations[][2] = { { if (w->flags & WF_DEAD) continue; - if (w->classification == WindowClass::MainWindow) + if (w->classification == WindowClass::mainWindow) { return w.get(); } @@ -727,32 +727,32 @@ static constexpr float kWindowScrollLocations[][2] = { return; auto* windowMgr = Ui::GetWindowManager(); - WindowBase* titleWind = windowMgr->FindByClass(WindowClass::TitleMenu); + WindowBase* titleWind = windowMgr->FindByClass(WindowClass::titleMenu); if (titleWind != nullptr) { titleWind->windowPos.x = (width - titleWind->width) / 2; titleWind->windowPos.y = height - 182; } - WindowBase* versionWind = windowMgr->FindByClass(WindowClass::TitleVersion); + WindowBase* versionWind = windowMgr->FindByClass(WindowClass::titleVersion); if (versionWind != nullptr) versionWind->windowPos.y = height - 30; - WindowBase* exitWind = windowMgr->FindByClass(WindowClass::TitleExit); + WindowBase* exitWind = windowMgr->FindByClass(WindowClass::titleExit); if (exitWind != nullptr) { exitWind->windowPos.x = width - 40; exitWind->windowPos.y = height - 64; } - WindowBase* optionsWind = windowMgr->FindByClass(WindowClass::TitleOptions); + WindowBase* optionsWind = windowMgr->FindByClass(WindowClass::titleOptions); if (optionsWind != nullptr) { optionsWind->windowPos.x = width - 80; } // Keep options window centred after a resize - WindowBase* optionsWindow = windowMgr->FindByClass(WindowClass::Options); + WindowBase* optionsWindow = windowMgr->FindByClass(WindowClass::options); if (optionsWindow != nullptr) { optionsWindow->windowPos.x = (ContextGetWidth() - optionsWindow->width) / 2; @@ -760,7 +760,7 @@ static constexpr float kWindowScrollLocations[][2] = { } // Keep progress bar window centred after a resize - WindowBase* ProgressWindow = windowMgr->FindByClass(WindowClass::ProgressWindow); + WindowBase* ProgressWindow = windowMgr->FindByClass(WindowClass::progressWindow); if (ProgressWindow != nullptr) { ProgressWindow->windowPos.x = (ContextGetWidth() - ProgressWindow->width) / 2; @@ -792,13 +792,13 @@ static constexpr float kWindowScrollLocations[][2] = { auto* windowMgr = Ui::GetWindowManager(); - WindowBase* topWind = windowMgr->FindByClass(WindowClass::TopToolbar); + WindowBase* topWind = windowMgr->FindByClass(WindowClass::topToolbar); if (topWind != nullptr) { topWind->width = std::max(640, width); } - WindowBase* bottomWind = windowMgr->FindByClass(WindowClass::BottomToolbar); + WindowBase* bottomWind = windowMgr->FindByClass(WindowClass::bottomToolbar); if (bottomWind != nullptr) { bottomWind->windowPos.y = height - 32; @@ -842,7 +842,7 @@ static constexpr float kWindowScrollLocations[][2] = { void TextinputCancel() { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::Textinput); + windowMgr->CloseByClass(WindowClass::textinput); } /** diff --git a/src/openrct2/interface/WindowClasses.h b/src/openrct2/interface/WindowClasses.h index 38dbe832d0..c3b95982e9 100644 --- a/src/openrct2/interface/WindowClasses.h +++ b/src/openrct2/interface/WindowClasses.h @@ -13,91 +13,91 @@ enum class WindowClass : uint8_t { - MainWindow = 0, - TopToolbar = 1, - BottomToolbar = 2, - Tooltip = 5, - Dropdown = 6, - About = 8, + mainWindow = 0, + topToolbar = 1, + bottomToolbar = 2, + tooltip = 5, + dropdown = 6, + about = 8, // WC_PUBLISHER_CREDITS = 9, // WC_MUSIC_CREDITS = 10, - Error = 11, - Ride = 12, - RideConstruction = 13, - SavePrompt = 14, - RideList = 15, - ConstructRide = 16, - DemolishRidePrompt = 17, - Scenery = 18, - Options = 19, - Footpath = 20, - Land = 21, - Water = 22, - Peep = 23, - GuestList = 24, - StaffList = 25, - FirePrompt = 26, - ParkInformation = 27, - Finances = 28, - TitleMenu = 29, - TitleExit = 30, - RecentNews = 31, - ScenarioSelect = 32, - TrackDesignList = 33, - TrackDesignPlace = 34, - NewCampaign = 35, - KeyboardShortcutList = 36, - ChangeKeyboardShortcut = 37, - Map = 38, - TitleLogo = 39, - Banner = 40, - MapTooltip = 41, - EditorObjectSelection = 42, - EditorInventionList = 43, - EditorInventionListDrag = 44, - EditorScenarioOptions = 45, - ManageTrackDesign = 47, - TrackDeletePrompt = 48, - InstallTrack = 49, - ClearScenery = 50, - SceneryScatter = 51, + error = 11, + ride = 12, + rideConstruction = 13, + savePrompt = 14, + rideList = 15, + constructRide = 16, + demolishRidePrompt = 17, + scenery = 18, + options = 19, + footpath = 20, + land = 21, + water = 22, + peep = 23, + guestList = 24, + staffList = 25, + firePrompt = 26, + parkInformation = 27, + finances = 28, + titleMenu = 29, + titleExit = 30, + recentNews = 31, + scenarioSelect = 32, + trackDesignList = 33, + trackDesignPlace = 34, + newCampaign = 35, + keyboardShortcutList = 36, + changeKeyboardShortcut = 37, + map = 38, + titleLogo = 39, + banner = 40, + mapTooltip = 41, + editorObjectSelection = 42, + editorInventionList = 43, + editorInventionListDrag = 44, + editorScenarioOptions = 45, + manageTrackDesign = 47, + trackDeletePrompt = 48, + installTrack = 49, + clearScenery = 50, + sceneryScatter = 51, - Cheats = 110, - Research = 111, - Viewport = 112, - Textinput = 113, - Mapgen = 114, - Loadsave = 115, - LoadsaveOverwritePrompt = 116, - TitleOptions = 117, - LandRights = 118, - Themes = 119, - TileInspector = 120, - Changelog = 121, - Multiplayer = 124, - Player = 125, - NetworkStatus = 126, - ServerList = 127, - ServerStart = 128, - CustomCurrencyConfig = 129, - DebugPaint = 130, - ViewClipping = 131, - ObjectLoadError = 132, - PatrolArea = 133, - Transparency = 134, - AssetPacks = 135, - ResetShortcutKeysPrompt = 136, - ProgressWindow = 137, - TitleVersion = 138, - EditorParkEntrance = 139, + cheats = 110, + research = 111, + viewport = 112, + textinput = 113, + mapgen = 114, + loadsave = 115, + loadsaveOverwritePrompt = 116, + titleOptions = 117, + landRights = 118, + themes = 119, + tileInspector = 120, + changelog = 121, + multiplayer = 124, + player = 125, + networkStatus = 126, + serverList = 127, + serverStart = 128, + customCurrencyConfig = 129, + debugPaint = 130, + viewClipping = 131, + objectLoadError = 132, + patrolArea = 133, + transparency = 134, + assetPacks = 135, + resetShortcutKeysPrompt = 136, + progressWindow = 137, + titleVersion = 138, + editorParkEntrance = 139, // Only used for colour schemes - Staff = 220, - EditorTrackBottomToolbar = 221, - EditorScenarioBottomToolbar = 222, - Chat = 223, - Console = 224, - Custom = 225, + staff = 220, + editorTrackBottomToolbar = 221, + editorScenarioBottomToolbar = 222, + chat = 223, + console = 224, + custom = 225, - Null = 255, + null = 255, }; diff --git a/src/openrct2/management/Award.cpp b/src/openrct2/management/Award.cpp index eadb5a33be..8d80493ed7 100644 --- a/src/openrct2/management/Award.cpp +++ b/src/openrct2/management/Award.cpp @@ -611,7 +611,7 @@ static void AwardAdd(AwardType type) { News::AddItemToQueue(News::ItemType::award, AwardGetNews(type), 0, {}); } - Ui::GetWindowManager()->InvalidateByClass(WindowClass::ParkInformation); + Ui::GetWindowManager()->InvalidateByClass(WindowClass::parkInformation); } /** @@ -637,7 +637,7 @@ void AwardUpdateAll() if (res != std::end(currentAwards)) { currentAwards.erase(res, std::end(currentAwards)); - windowMgr->InvalidateByClass(WindowClass::ParkInformation); + windowMgr->InvalidateByClass(WindowClass::parkInformation); } // Only add new awards if park is open diff --git a/src/openrct2/management/Finance.cpp b/src/openrct2/management/Finance.cpp index 0c512f7858..aadca32ddf 100644 --- a/src/openrct2/management/Finance.cpp +++ b/src/openrct2/management/Finance.cpp @@ -304,7 +304,7 @@ void FinanceUpdateDailyProfit() park.weeklyProfitAverageDivisor += 1; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::Finances); + windowMgr->InvalidateByClass(WindowClass::finances); } /** @@ -342,7 +342,7 @@ void FinanceShiftExpenditureTable() } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::Finances); + windowMgr->InvalidateByClass(WindowClass::finances); } /** diff --git a/src/openrct2/management/Marketing.cpp b/src/openrct2/management/Marketing.cpp index f743f8ba9c..52ccdac77e 100644 --- a/src/openrct2/management/Marketing.cpp +++ b/src/openrct2/management/Marketing.cpp @@ -143,7 +143,7 @@ void MarketingUpdate() } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::Finances); + windowMgr->InvalidateByClass(WindowClass::finances); } void MarketingSetGuestCampaign(Guest* peep, int32_t campaignType) diff --git a/src/openrct2/management/NewsItem.cpp b/src/openrct2/management/NewsItem.cpp index b2973d6378..ae217508cb 100644 --- a/src/openrct2/management/NewsItem.cpp +++ b/src/openrct2/management/NewsItem.cpp @@ -193,7 +193,7 @@ void News::ItemQueues::ArchiveCurrent() // Invalidate the news window auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::RecentNews); + windowMgr->InvalidateByClass(WindowClass::recentNews); // Dequeue the current news item, shift news up Recent.pop_front(); @@ -372,7 +372,7 @@ void News::OpenSubject(News::ItemType type, int32_t subject) { case News::ItemType::ride: { - auto intent = Intent(WindowClass::Ride); + auto intent = Intent(WindowClass::ride); intent.PutExtra(INTENT_EXTRA_RIDE_ID, subject); ContextOpenIntent(&intent); break; @@ -383,14 +383,14 @@ void News::OpenSubject(News::ItemType type, int32_t subject) auto peep = getGameState().entities.TryGetEntity(EntityId::FromUnderlying(subject)); if (peep != nullptr) { - auto intent = Intent(WindowClass::Peep); + auto intent = Intent(WindowClass::peep); intent.PutExtra(INTENT_EXTRA_PEEP, peep); ContextOpenIntent(&intent); } break; } case News::ItemType::money: - ContextOpenWindow(WindowClass::Finances); + ContextOpenWindow(WindowClass::finances); break; case News::ItemType::campaign: ContextOpenWindowView(WV_FINANCE_MARKETING); @@ -414,7 +414,7 @@ void News::OpenSubject(News::ItemType type, int32_t subject) } case News::ItemType::peeps: { - auto intent = Intent(WindowClass::GuestList); + auto intent = Intent(WindowClass::guestList); intent.PutExtra(INTENT_EXTRA_GUEST_LIST_FILTER, static_cast(GuestListFilterType::guestsThinkingX)); intent.PutExtra(INTENT_EXTRA_RIDE_ID, subject); ContextOpenIntent(&intent); @@ -458,7 +458,7 @@ void News::DisableNewsItems(News::ItemType type, uint32_t assoc) { newsItem.setFlags(News::ItemFlags::hasButton); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::RecentNews); + windowMgr->InvalidateByClass(WindowClass::recentNews); } }); } diff --git a/src/openrct2/management/Research.cpp b/src/openrct2/management/Research.cpp index 1c09dc8740..e09a1fd68c 100644 --- a/src/openrct2/management/Research.cpp +++ b/src/openrct2/management/Research.cpp @@ -129,8 +129,8 @@ static void ResearchCalculateExpectedDate() static void ResearchInvalidateRelatedWindows() { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::ConstructRide); - windowMgr->InvalidateByClass(WindowClass::Research); + windowMgr->InvalidateByClass(WindowClass::constructRide); + windowMgr->InvalidateByClass(WindowClass::research); } static void ResearchMarkAsFullyCompleted() diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index 634e9574fd..a5cd09736d 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -565,7 +565,7 @@ namespace OpenRCT2::Network char str_resolving[256]; FormatStringLegacy(str_resolving, 256, STR_MULTIPLAYER_RESOLVING, nullptr); - auto intent = Intent(WindowClass::NetworkStatus); + auto intent = Intent(WindowClass::networkStatus); intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ str_resolving }); intent.PutExtra( INTENT_EXTRA_CALLBACK, []() -> void { OpenRCT2::GetContext()->GetNetwork().Close(); }); @@ -581,7 +581,7 @@ namespace OpenRCT2::Network char str_connecting[256]; FormatStringLegacy(str_connecting, 256, STR_MULTIPLAYER_CONNECTING, nullptr); - auto intent = Intent(WindowClass::NetworkStatus); + auto intent = Intent(WindowClass::networkStatus); intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ str_connecting }); intent.PutExtra( INTENT_EXTRA_CALLBACK, []() -> void { OpenRCT2::GetContext()->GetNetwork().Close(); }); @@ -599,7 +599,7 @@ namespace OpenRCT2::Network char str_authenticating[256]; FormatStringLegacy(str_authenticating, 256, STR_MULTIPLAYER_AUTHENTICATING, nullptr); - auto intent = Intent(WindowClass::NetworkStatus); + auto intent = Intent(WindowClass::networkStatus); intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ str_authenticating }); intent.PutExtra(INTENT_EXTRA_CALLBACK, []() -> void { OpenRCT2::GetContext()->GetNetwork().Close(); }); ContextOpenIntent(&intent); @@ -614,7 +614,7 @@ namespace OpenRCT2::Network } Close(); - ContextForceCloseWindowByClass(WindowClass::NetworkStatus); + ContextForceCloseWindowByClass(WindowClass::networkStatus); ContextShowError(STR_UNABLE_TO_CONNECT_TO_SERVER, kStringIdNone, {}); break; } @@ -628,7 +628,7 @@ namespace OpenRCT2::Network // Do not show disconnect message window when password window closed/canceled if (_serverConnection->AuthStatus == Auth::requirePassword) { - ContextForceCloseWindowByClass(WindowClass::NetworkStatus); + ContextForceCloseWindowByClass(WindowClass::networkStatus); } else { @@ -645,13 +645,13 @@ namespace OpenRCT2::Network FormatStringLegacy(str_disconnected, 256, STR_MULTIPLAYER_DISCONNECTED_NO_REASON, nullptr); } - auto intent = Intent(WindowClass::NetworkStatus); + auto intent = Intent(WindowClass::networkStatus); intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ str_disconnected }); ContextOpenIntent(&intent); } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::Multiplayer); + windowMgr->CloseByClass(WindowClass::multiplayer); Close(); } else @@ -859,7 +859,7 @@ namespace OpenRCT2::Network char str_desync[256]; FormatStringLegacy(str_desync, 256, STR_MULTIPLAYER_DESYNC, nullptr); - auto intent = Intent(WindowClass::NetworkStatus); + auto intent = Intent(WindowClass::networkStatus); intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ str_desync }); ContextOpenIntent(&intent); @@ -2587,7 +2587,7 @@ namespace OpenRCT2::Network char str_desync[1024]; FormatStringLegacy(str_desync, sizeof(str_desync), STR_DESYNC_REPORT, ft.Data()); - auto intent = Intent(WindowClass::NetworkStatus); + auto intent = Intent(WindowClass::networkStatus); intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ str_desync }); ContextOpenIntent(&intent); } @@ -2805,7 +2805,7 @@ namespace OpenRCT2::Network // Allow queue processing of game actions again. GameActions::ResumeQueue(); - ContextForceCloseWindowByClass(WindowClass::ProgressWindow); + ContextForceCloseWindowByClass(WindowClass::progressWindow); GameUnloadScripts(); GameNotifyMapChange(); @@ -3157,7 +3157,7 @@ namespace OpenRCT2::Network { connection.player->Ping = ping; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Player, connection.player->Id); + windowMgr->InvalidateByNumber(WindowClass::player, connection.player->Id); } } @@ -3178,7 +3178,7 @@ namespace OpenRCT2::Network } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::Player); + windowMgr->InvalidateByClass(WindowClass::player); } void NetworkBase::Client_Handle_SETDISCONNECTMSG(Connection& connection, Packet& packet) @@ -3626,7 +3626,7 @@ namespace OpenRCT2::Network } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Player, playerId); + windowMgr->InvalidateByNumber(WindowClass::player, playerId); // Log set player group event Player* game_command_player = network.GetPlayerByID(actionPlayerId); diff --git a/src/openrct2/network/NetworkPlayer.cpp b/src/openrct2/network/NetworkPlayer.cpp index cc11793c2a..e92799e6a0 100644 --- a/src/openrct2/network/NetworkPlayer.cpp +++ b/src/openrct2/network/NetworkPlayer.cpp @@ -42,14 +42,14 @@ namespace OpenRCT2::Network { CommandsRan++; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Player, Id); + windowMgr->InvalidateByNumber(WindowClass::player, Id); } void Player::AddMoneySpent(money64 cost) { MoneySpent += cost; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Player, Id); + windowMgr->InvalidateByNumber(WindowClass::player, Id); } } // namespace OpenRCT2::Network diff --git a/src/openrct2/paint/Painter.cpp b/src/openrct2/paint/Painter.cpp index 5435dde082..2fd0c56646 100644 --- a/src/openrct2/paint/Painter.cpp +++ b/src/openrct2/paint/Painter.cpp @@ -104,7 +104,7 @@ static bool ShouldShowFPS() return true; auto* windowMgr = Ui::GetWindowManager(); - return windowMgr->FindByClass(WindowClass::TopToolbar); + return windowMgr->FindByClass(WindowClass::topToolbar); } void Painter::PaintFPS(RenderTarget& rt) diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index 40d2fc46d3..266555aa29 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -384,7 +384,7 @@ void RideUpdateFavouritedStat() } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::RideList); + windowMgr->InvalidateByClass(WindowClass::rideList); } /** @@ -766,7 +766,7 @@ bool Ride::findTrackGap(const CoordsXYE& input, CoordsXYE* output) const return false; auto* windowMgr = Ui::GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w != nullptr && _rideConstructionState != RideConstructionState::State0 && _currentRideIndex == id) { RideConstructionInvalidateCurrentTrack(); @@ -2714,7 +2714,7 @@ static ResultWithMessage RideCheckBlockBrakes(const CoordsXYE& input, CoordsXYE* RideId rideIndex = input.element->AsTrack()->GetRideIndex(); auto* windowMgr = Ui::GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w != nullptr && _rideConstructionState != RideConstructionState::State0 && _currentRideIndex == rideIndex) RideConstructionInvalidateCurrentTrack(); @@ -2779,7 +2779,7 @@ static bool RideCheckTrackContainsInversions(const CoordsXYE& input, CoordsXYE* } auto* windowMgr = Ui::GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w != nullptr && _rideConstructionState != RideConstructionState::State0 && rideIndex == _currentRideIndex) { RideConstructionInvalidateCurrentTrack(); @@ -2840,7 +2840,7 @@ static bool RideCheckTrackContainsBanked(const CoordsXYE& input, CoordsXYE* outp return true; auto* windowMgr = Ui::GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w != nullptr && _rideConstructionState != RideConstructionState::State0 && rideIndex == _currentRideIndex) { RideConstructionInvalidateCurrentTrack(); @@ -2882,7 +2882,7 @@ static bool RideCheckTrackContainsBanked(const CoordsXYE& input, CoordsXYE* outp static int32_t RideCheckStationLength(const CoordsXYE& input, CoordsXYE* output) { auto* windowMgr = Ui::GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w != nullptr && _rideConstructionState != RideConstructionState::State0 && _currentRideIndex == input.element->AsTrack()->GetRideIndex()) { @@ -2945,7 +2945,7 @@ static bool RideCheckStartAndEndIsStation(const CoordsXYE& input) return false; auto* windowMgr = Ui::GetWindowManager(); - auto w = windowMgr->FindByClass(WindowClass::RideConstruction); + auto w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w != nullptr && _rideConstructionState != RideConstructionState::State0 && rideIndex == _currentRideIndex) { RideConstructionInvalidateCurrentTrack(); @@ -3990,7 +3990,7 @@ void Ride::constructMissingEntranceOrExit() const } auto* windowMgr = Ui::GetWindowManager(); - w = windowMgr->FindByClass(WindowClass::RideConstruction); + w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w != nullptr) w->onMouseUp(entranceOrExit); } @@ -4049,7 +4049,7 @@ ResultWithMessage Ride::test(bool isApplying) } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByNumber(WindowClass::RideConstruction, id.ToUnderlying()); + windowMgr->CloseByNumber(WindowClass::rideConstruction, id.ToUnderlying()); StationIndex stationIndex = {}; auto message = changeStatusDoStationChecks(stationIndex); @@ -4128,10 +4128,10 @@ ResultWithMessage Ride::open(bool isApplying) // to set the track to its final state and clean up ghosts. // We can't just call close as it would cause a stack overflow during shop creation // with auto open on. - if (isToolActive(WindowClass::RideConstruction, static_cast(id.ToUnderlying()))) + if (isToolActive(WindowClass::rideConstruction, static_cast(id.ToUnderlying()))) { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByNumber(WindowClass::RideConstruction, id.ToUnderlying()); + windowMgr->CloseByNumber(WindowClass::rideConstruction, id.ToUnderlying()); } StationIndex stationIndex = {}; @@ -4666,7 +4666,7 @@ void InvalidateTestResults(Ride& ride) } auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Ride, ride.id.ToUnderlying()); + windowMgr->InvalidateByNumber(WindowClass::ride, ride.id.ToUnderlying()); } /** @@ -5040,7 +5040,7 @@ static int32_t RideGetTrackLength(const Ride& ride) RideId rideIndex = tileElement->AsTrack()->GetRideIndex(); auto* windowMgr = Ui::GetWindowManager(); - WindowBase* w = windowMgr->FindByClass(WindowClass::RideConstruction); + WindowBase* w = windowMgr->FindByClass(WindowClass::rideConstruction); if (w != nullptr && _rideConstructionState != RideConstructionState::State0 && _currentRideIndex == rideIndex) { RideConstructionInvalidateCurrentTrack(); @@ -5226,7 +5226,7 @@ void Ride::updateMaxVehicles() numTrains = newNumTrains; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Ride, id.ToUnderlying()); + windowMgr->InvalidateByNumber(WindowClass::ride, id.ToUnderlying()); } } diff --git a/src/openrct2/ride/RideConstruction.cpp b/src/openrct2/ride/RideConstruction.cpp index e32106ff5c..0e63a38d63 100644 --- a/src/openrct2/ride/RideConstruction.cpp +++ b/src/openrct2/ride/RideConstruction.cpp @@ -121,7 +121,7 @@ static WindowBase* ride_create_or_find_construction_window(RideId rideIndex) auto intent = Intent(INTENT_ACTION_RIDE_CONSTRUCTION_FOCUS); intent.PutExtra(INTENT_EXTRA_RIDE_ID, rideIndex.ToUnderlying()); windowManager->BroadcastIntent(intent); - return windowManager->FindByClass(WindowClass::RideConstruction); + return windowManager->FindByClass(WindowClass::rideConstruction); } /** @@ -237,7 +237,7 @@ void RideClearForConstruction(Ride& ride) RideClearBlockedTiles(ride); auto* windowMgr = Ui::GetWindowManager(); - auto w = windowMgr->FindByNumber(WindowClass::Ride, ride.id.ToUnderlying()); + auto w = windowMgr->FindByNumber(WindowClass::ride, ride.id.ToUnderlying()); if (w != nullptr) w->onResize(); } @@ -860,19 +860,19 @@ static bool ride_modify_entrance_or_exit(const CoordsXYE& tileElement) // Get or create construction window for ride auto* windowMgr = Ui::GetWindowManager(); - auto constructionWindow = windowMgr->FindByClass(WindowClass::RideConstruction); + auto constructionWindow = windowMgr->FindByClass(WindowClass::rideConstruction); if (constructionWindow == nullptr) { if (!RideInitialiseConstructionWindow(*ride)) return false; - constructionWindow = windowMgr->FindByClass(WindowClass::RideConstruction); + constructionWindow = windowMgr->FindByClass(WindowClass::rideConstruction); if (constructionWindow == nullptr) return false; } RideConstructionInvalidateCurrentTrack(); - if (_rideConstructionState != RideConstructionState::EntranceExit || !isToolActive(WindowClass::RideConstruction)) + if (_rideConstructionState != RideConstructionState::EntranceExit || !isToolActive(WindowClass::rideConstruction)) { // Replace entrance / exit ToolSet( @@ -900,7 +900,7 @@ static bool ride_modify_entrance_or_exit(const CoordsXYE& tileElement) rideEntranceExitRemove.SetCallback([=](const GameActions::GameAction* ga, const GameActions::Result* result) { gRideEntranceExitPlaceType = entranceType; - windowMgr->InvalidateByClass(WindowClass::RideConstruction); + windowMgr->InvalidateByClass(WindowClass::rideConstruction); auto newToolWidgetIndex = (entranceType == ENTRANCE_TYPE_RIDE_ENTRANCE) ? WC_RIDE_CONSTRUCTION__WIDX_ENTRANCE : WC_RIDE_CONSTRUCTION__WIDX_EXIT; @@ -912,7 +912,7 @@ static bool ride_modify_entrance_or_exit(const CoordsXYE& tileElement) GameActions::Execute(&rideEntranceExitRemove, getGameState()); } - windowMgr->InvalidateByClass(WindowClass::RideConstruction); + windowMgr->InvalidateByClass(WindowClass::rideConstruction); return true; } diff --git a/src/openrct2/ride/Vehicle.cpp b/src/openrct2/ride/Vehicle.cpp index e207ee0220..a151779218 100644 --- a/src/openrct2/ride/Vehicle.cpp +++ b/src/openrct2/ride/Vehicle.cpp @@ -853,7 +853,7 @@ void Vehicle::UpdateMeasurements() ClearFlag(VehicleFlags::Testing); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Ride, ride.ToUnderlying()); + windowMgr->InvalidateByNumber(WindowClass::ride, ride.ToUnderlying()); return; } @@ -2350,7 +2350,7 @@ static void test_finish(Ride& ride) ride.averageSpeed = ride.averageSpeed / totalTime; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Ride, ride.id.ToUnderlying()); + windowMgr->InvalidateByNumber(WindowClass::ride, ride.id.ToUnderlying()); } void Vehicle::UpdateTestFinish() @@ -2404,7 +2404,7 @@ static void test_reset(Ride& ride, StationIndex curStation) ride.currentTestStation = curStation; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByNumber(WindowClass::Ride, ride.id.ToUnderlying()); + windowMgr->InvalidateByNumber(WindowClass::ride, ride.id.ToUnderlying()); } void Vehicle::TestReset() diff --git a/src/openrct2/scenario/Scenario.cpp b/src/openrct2/scenario/Scenario.cpp index 9498ec46c1..2fd84e456c 100644 --- a/src/openrct2/scenario/Scenario.cpp +++ b/src/openrct2/scenario/Scenario.cpp @@ -168,7 +168,7 @@ static void ScenarioEnd() GameResetSpeed(); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByClass(WindowClass::Dropdown); + windowMgr->CloseByClass(WindowClass::dropdown); windowMgr->CloseAllExceptFlags(WF_STICK_TO_BACK | WF_STICK_TO_FRONT); ContextOpenWindowView(WV_PARK_OBJECTIVE); diff --git a/src/openrct2/scenes/game/GameScene.cpp b/src/openrct2/scenes/game/GameScene.cpp index cf579e7751..8b0d6a0b0a 100644 --- a/src/openrct2/scenes/game/GameScene.cpp +++ b/src/openrct2/scenes/game/GameScene.cpp @@ -39,5 +39,5 @@ void GameScene::Stop() // Force closure of any object selection windows, regardless of valid state. // NB: this is relevant for both in-game scenes and editors, as the window // may be opened in-game using cheats. - ContextForceCloseWindowByClass(WindowClass::EditorObjectSelection); + ContextForceCloseWindowByClass(WindowClass::editorObjectSelection); } diff --git a/src/openrct2/scenes/preloader/PreloaderScene.cpp b/src/openrct2/scenes/preloader/PreloaderScene.cpp index db92423a3e..0a33469f2f 100644 --- a/src/openrct2/scenes/preloader/PreloaderScene.cpp +++ b/src/openrct2/scenes/preloader/PreloaderScene.cpp @@ -38,7 +38,7 @@ void PreloaderScene::Load() gLegacyScene = LegacyScene::playing; gameStateInitAll(getGameState(), kDefaultMapSize); ViewportInitAll(); - ContextOpenWindow(WindowClass::MainWindow); + ContextOpenWindow(WindowClass::mainWindow); WindowSetFlagForAllViewports(VIEWPORT_FLAG_RENDERING_INHIBITED, true); WindowResizeGui(ContextGetWidth(), ContextGetHeight()); diff --git a/src/openrct2/scenes/title/TitleScene.cpp b/src/openrct2/scenes/title/TitleScene.cpp index db57a3933a..faf1a4a4e6 100644 --- a/src/openrct2/scenes/title/TitleScene.cpp +++ b/src/openrct2/scenes/title/TitleScene.cpp @@ -108,7 +108,7 @@ void TitleScene::Load() #endif gameStateInitAll(getGameState(), kDefaultMapSize); ViewportInitAll(); - ContextOpenWindow(WindowClass::MainWindow); + ContextOpenWindow(WindowClass::mainWindow); TitleInitialise(); @@ -128,7 +128,7 @@ void TitleScene::Load() if (gOpenRCT2ShowChangelog) { gOpenRCT2ShowChangelog = false; - ContextOpenWindow(WindowClass::Changelog); + ContextOpenWindow(WindowClass::changelog); } LOG_VERBOSE("TitleScene::Load() finished"); @@ -195,11 +195,11 @@ void TitleScene::ChangePresetSequence(size_t preset) */ void TitleScene::CreateWindows() { - ContextOpenWindow(WindowClass::TitleMenu); - ContextOpenWindow(WindowClass::TitleExit); - ContextOpenWindow(WindowClass::TitleOptions); - ContextOpenWindow(WindowClass::TitleLogo); - ContextOpenWindow(WindowClass::TitleVersion); + ContextOpenWindow(WindowClass::titleMenu); + ContextOpenWindow(WindowClass::titleExit); + ContextOpenWindow(WindowClass::titleOptions); + ContextOpenWindow(WindowClass::titleLogo); + ContextOpenWindow(WindowClass::titleVersion); WindowResizeGui(ContextGetWidth(), ContextGetHeight()); } diff --git a/src/openrct2/scripting/bindings/world/ScPark.cpp b/src/openrct2/scripting/bindings/world/ScPark.cpp index 85ec31110a..a06af41f29 100644 --- a/src/openrct2/scripting/bindings/world/ScPark.cpp +++ b/src/openrct2/scripting/bindings/world/ScPark.cpp @@ -133,7 +133,7 @@ namespace OpenRCT2::Scripting { gameState.park.entranceFee = value; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::ParkInformation); + windowMgr->InvalidateByClass(WindowClass::parkInformation); } } @@ -231,7 +231,7 @@ namespace OpenRCT2::Scripting { gameState.park.totalAdmissions = value; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::ParkInformation); + windowMgr->InvalidateByClass(WindowClass::parkInformation); } } @@ -248,7 +248,7 @@ namespace OpenRCT2::Scripting { gameState.park.totalIncomeFromAdmissions = value; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::ParkInformation); + windowMgr->InvalidateByClass(WindowClass::parkInformation); } } diff --git a/src/openrct2/windows/Intent.h b/src/openrct2/windows/Intent.h index 575540cd41..8137557038 100644 --- a/src/openrct2/windows/Intent.h +++ b/src/openrct2/windows/Intent.h @@ -70,7 +70,7 @@ namespace OpenRCT2 class Intent { - WindowClass _Class{ WindowClass::Null }; + WindowClass _Class{ WindowClass::null }; WindowDetail _WindowDetail{ WD_NULL }; IntentAction _Action{ INTENT_ACTION_NULL }; IntentDataStorage _Data; diff --git a/src/openrct2/world/Park.cpp b/src/openrct2/world/Park.cpp index 00f65aa865..bfdf4578b2 100644 --- a/src/openrct2/world/Park.cpp +++ b/src/openrct2/world/Park.cpp @@ -345,7 +345,7 @@ namespace OpenRCT2::Park park.suggestedGuestMaximum = calculateSuggestedMaxGuests(park, gameState); park.guestGenerationProbability = calculateGuestGenerationProbability(park); - windowMgr->InvalidateByClass(WindowClass::Finances); + windowMgr->InvalidateByClass(WindowClass::finances); auto intent = Intent(INTENT_ACTION_UPDATE_PARK_RATING); ContextBroadcastIntent(&intent); } @@ -621,8 +621,8 @@ namespace OpenRCT2::Park ContextBroadcastIntent(&intent); auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::ParkInformation); - windowMgr->InvalidateByClass(WindowClass::Finances); + windowMgr->InvalidateByClass(WindowClass::parkInformation); + windowMgr->InvalidateByClass(WindowClass::finances); } uint32_t UpdateSize(ParkData& park) @@ -633,7 +633,7 @@ namespace OpenRCT2::Park park.size = tiles; auto* windowMgr = Ui::GetWindowManager(); - windowMgr->InvalidateByClass(WindowClass::ParkInformation); + windowMgr->InvalidateByClass(WindowClass::parkInformation); } return tiles; } diff --git a/src/openrct2/world/TileInspector.cpp b/src/openrct2/world/TileInspector.cpp index 159bfb4bd1..7f7d5b568e 100644 --- a/src/openrct2/world/TileInspector.cpp +++ b/src/openrct2/world/TileInspector.cpp @@ -85,7 +85,7 @@ namespace OpenRCT2::TileInspector { // Return true for everyone who has the window open and tile selected auto* windowMgr = Ui::GetWindowManager(); - auto* window = windowMgr->FindByClass(WindowClass::TileInspector); + auto* window = windowMgr->FindByClass(WindowClass::tileInspector); return window != nullptr && loc == windowTileInspectorTile.ToCoordsXY(); } diff --git a/src/openrct2/world/tile_element/TileElement.cpp b/src/openrct2/world/tile_element/TileElement.cpp index 65348faf3b..11c17c7aca 100644 --- a/src/openrct2/world/tile_element/TileElement.cpp +++ b/src/openrct2/world/tile_element/TileElement.cpp @@ -75,7 +75,7 @@ namespace OpenRCT2 if (banner != nullptr) { auto* windowMgr = Ui::GetWindowManager(); - windowMgr->CloseByNumber(WindowClass::Banner, bannerIndex.ToUnderlying()); + windowMgr->CloseByNumber(WindowClass::banner, bannerIndex.ToUnderlying()); DeleteBanner(banner->id); } }