1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Change PromptMode members to new codestyle

This commit is contained in:
Gymnasiast
2025-03-01 15:48:02 +01:00
parent 9cf02f3635
commit a45625fc3e
7 changed files with 16 additions and 16 deletions

View File

@@ -204,9 +204,9 @@ namespace OpenRCT2::Ui::Windows
WindowBase* SavePromptOpen()
{
PromptMode prompt_mode = gSavePromptMode;
if (prompt_mode == PromptMode::Quit)
if (prompt_mode == PromptMode::quit)
{
prompt_mode = PromptMode::SaveBeforeQuit;
prompt_mode = PromptMode::saveBeforeQuit;
}
// do not show save prompt if we're in the title demo and click on load game

View File

@@ -446,7 +446,7 @@ namespace OpenRCT2::Ui::Windows
case DDIDX_NEW_GAME:
{
auto loadOrQuitAction = LoadOrQuitAction(
LoadOrQuitModes::OpenSavePrompt, PromptMode::SaveBeforeNewGame);
LoadOrQuitModes::OpenSavePrompt, PromptMode::saveBeforeNewGame);
GameActions::Execute(&loadOrQuitAction);
break;
}
@@ -505,7 +505,7 @@ namespace OpenRCT2::Ui::Windows
windowMgr->CloseByClass(WindowClass::ManageTrackDesign);
windowMgr->CloseByClass(WindowClass::TrackDeletePrompt);
auto loadOrQuitAction = LoadOrQuitAction(
LoadOrQuitModes::OpenSavePrompt, PromptMode::SaveBeforeQuit);
LoadOrQuitModes::OpenSavePrompt, PromptMode::saveBeforeQuit);
GameActions::Execute(&loadOrQuitAction);
break;
}

View File

@@ -395,7 +395,7 @@ namespace OpenRCT2
void Quit() override
{
gSavePromptMode = PromptMode::Quit;
gSavePromptMode = PromptMode::quit;
ContextOpenWindow(WindowClass::SavePrompt);
}

View File

@@ -651,7 +651,7 @@ void GameLoadOrQuitNoSavePrompt()
{
switch (gSavePromptMode)
{
case PromptMode::SaveBeforeLoad:
case PromptMode::saveBeforeLoad:
{
auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::CloseSavePrompt);
GameActions::Execute(&loadOrQuitAction);
@@ -669,7 +669,7 @@ void GameLoadOrQuitNoSavePrompt()
}
break;
}
case PromptMode::SaveBeforeQuit:
case PromptMode::saveBeforeQuit:
{
auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::CloseSavePrompt);
GameActions::Execute(&loadOrQuitAction);
@@ -687,7 +687,7 @@ void GameLoadOrQuitNoSavePrompt()
context->SetActiveScene(context->GetTitleScene());
break;
}
case PromptMode::SaveBeforeNewGame:
case PromptMode::saveBeforeNewGame:
{
auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::CloseSavePrompt);
GameActions::Execute(&loadOrQuitAction);

View File

@@ -22,11 +22,11 @@ class LoadOrQuitAction final : public GameActionBase<GameCommand::LoadOrQuit>
{
private:
LoadOrQuitModes _mode{};
PromptMode _savePromptMode{ PromptMode::SaveBeforeLoad };
PromptMode _savePromptMode{ PromptMode::saveBeforeLoad };
public:
LoadOrQuitAction() = default;
LoadOrQuitAction(LoadOrQuitModes mode, PromptMode savePromptMode = PromptMode::SaveBeforeLoad);
LoadOrQuitAction(LoadOrQuitModes mode, PromptMode savePromptMode = PromptMode::saveBeforeLoad);
void AcceptParameters(GameActionParameterVisitor& visitor) override;

View File

@@ -196,11 +196,11 @@ constexpr int32_t WC_TILE_INSPECTOR__WIDX_BANNER_SPINNER_HEIGHT_DECREASE = 30;
enum class PromptMode : uint8_t
{
SaveBeforeLoad = 0,
SaveBeforeQuit,
SaveBeforeQuit2,
SaveBeforeNewGame,
Quit
saveBeforeLoad = 0,
saveBeforeQuit,
saveBeforeQuit2,
saveBeforeNewGame,
quit
};
enum BTM_TOOLBAR_DIRTY_FLAGS

View File

@@ -2827,7 +2827,7 @@ void NetworkBase::Client_Handle_MAP([[maybe_unused]] NetworkConnection& connecti
else
{
// Something went wrong, game is not loaded. Return to main screen.
auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::OpenSavePrompt, PromptMode::SaveBeforeQuit);
auto loadOrQuitAction = LoadOrQuitAction(LoadOrQuitModes::OpenSavePrompt, PromptMode::saveBeforeQuit);
GameActions::Execute(&loadOrQuitAction);
}
if (has_to_free)