mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-26 00:45:35 +00:00
Codechange: make TownFounding a scoped enum
This commit is contained in:
committed by
Peter Nelson
parent
3ba0706a5c
commit
02becd50c5
+2
-2
@@ -1176,7 +1176,7 @@ public:
|
||||
this->GetWidget<NWidgetStacked>(WID_TF_TOWN_ACTION_SEL)->SetDisplayedPlane(SZSP_HORIZONTAL);
|
||||
this->GetWidget<NWidgetStacked>(WID_TF_TOWN_EXPAND_SEL)->SetDisplayedPlane(SZSP_HORIZONTAL);
|
||||
this->GetWidget<NWidgetStacked>(WID_TF_SIZE_SEL)->SetDisplayedPlane(SZSP_VERTICAL);
|
||||
if (_settings_game.economy.found_town != TF_CUSTOM_LAYOUT) {
|
||||
if (_settings_game.economy.found_town != TownFounding::CustomLayout) {
|
||||
this->GetWidget<NWidgetStacked>(WID_TF_ROAD_LAYOUT_SEL)->SetDisplayedPlane(SZSP_HORIZONTAL);
|
||||
} else {
|
||||
this->GetWidget<NWidgetStacked>(WID_TF_ROAD_LAYOUT_SEL)->SetDisplayedPlane(0);
|
||||
@@ -1200,7 +1200,7 @@ public:
|
||||
void UpdateButtons(bool check_availability)
|
||||
{
|
||||
if (check_availability && _game_mode != GameMode::Editor) {
|
||||
if (_settings_game.economy.found_town != TF_CUSTOM_LAYOUT) this->town_layout = _settings_game.economy.town_layout;
|
||||
if (_settings_game.economy.found_town != TownFounding::CustomLayout) this->town_layout = _settings_game.economy.town_layout;
|
||||
this->ReInit();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user