Change: rebrand Cheats as Sandbox Options (#11874)

This commit is contained in:
Patric Stout
2024-01-26 19:56:01 +01:00
committed by GitHub
parent 28716548d2
commit 80ebcc72fb
3 changed files with 20 additions and 26 deletions

View File

@@ -228,6 +228,7 @@ enum OptionMenuEntries {
OME_AI_SETTINGS,
OME_GAMESCRIPT_SETTINGS,
OME_NEWGRFSETTINGS,
ONE_SANDBOX,
OME_TRANSPARENCIES,
OME_SHOW_TOWNNAMES,
OME_SHOW_STATIONNAMES,
@@ -259,6 +260,9 @@ static CallBackFunction ToolbarOptionsClick(Window *w)
list.push_back(std::make_unique<DropDownListStringItem>(STR_SETTINGS_MENU_GAMESCRIPT_SETTINGS, OME_GAMESCRIPT_SETTINGS, false));
}
list.push_back(std::make_unique<DropDownListStringItem>(STR_SETTINGS_MENU_NEWGRF_SETTINGS, OME_NEWGRFSETTINGS, false));
if (_game_mode != GM_EDITOR) {
list.push_back(std::make_unique<DropDownListStringItem>(STR_SETTINGS_MENU_SANDBOX_OPTIONS, ONE_SANDBOX, false));
}
list.push_back(std::make_unique<DropDownListStringItem>(STR_SETTINGS_MENU_TRANSPARENCY_OPTIONS, OME_TRANSPARENCIES, false));
list.push_back(std::make_unique<DropDownListDividerItem>(-1, false));
list.push_back(std::make_unique<DropDownListCheckedItem>(HasBit(_display_opt, DO_SHOW_TOWN_NAMES), STR_SETTINGS_MENU_TOWN_NAMES_DISPLAYED, OME_SHOW_TOWNNAMES, false));
@@ -290,6 +294,7 @@ static CallBackFunction MenuClickSettings(int index)
case OME_AI_SETTINGS: ShowAIConfigWindow(); return CBF_NONE;
case OME_GAMESCRIPT_SETTINGS: ShowGSConfigWindow(); return CBF_NONE;
case OME_NEWGRFSETTINGS: ShowNewGRFSettings(!_networking && _settings_client.gui.UserIsAllowedToChangeNewGRFs(), true, true, &_grfconfig); return CBF_NONE;
case ONE_SANDBOX: ShowCheatWindow(); break;
case OME_TRANSPARENCIES: ShowTransparencyToolbar(); break;
case OME_SHOW_TOWNNAMES: ToggleBit(_display_opt, DO_SHOW_TOWN_NAMES); break;