fix: Adjust Found Town gui

fix: Found town in toolbar opened subsidies
This commit is contained in:
2024-04-10 23:23:10 +01:00
parent 8265fd8dd0
commit 371a7f342d
2 changed files with 37 additions and 38 deletions

View File

@@ -482,11 +482,7 @@ static CallBackFunction MenuClickTown(int index)
{
switch (index) {
case 0: ShowTownDirectory(); break;
case 1: ShowSubsidiesList(); break;
case 2: ShowIndustryDirectory(); break;
case 3: ShowIndustryCargoesWindow(); break;
case 4: if (_local_company != COMPANY_SPECTATOR) ShowBuildIndustryWindow(); break;
case 5: // setting could be changed when the dropdown was open
case 1: // setting could be changed when the dropdown was open
if (_settings_game.economy.found_town != TF_FORBIDDEN) ShowFoundTownWindow();
break;
}

View File

@@ -1101,6 +1101,7 @@ static constexpr NWidgetPart _nested_found_town_widgets[] = {
EndContainer(),
/* Construct new town(s) buttons. */
NWidget(WWT_PANEL, COLOUR_DARK_GREEN),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_VERTICAL), SetPIP(0, WidgetDimensions::unscaled.vsep_normal, 0), SetPadding(WidgetDimensions::unscaled.picker),
NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_TF_NEW_TOWN), SetDataTip(STR_FOUND_TOWN_NEW_TOWN_BUTTON, STR_FOUND_TOWN_NEW_TOWN_TOOLTIP), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_TF_RANDOM_TOWN), SetDataTip(STR_FOUND_TOWN_RANDOM_TOWN_BUTTON, STR_FOUND_TOWN_RANDOM_TOWN_TOOLTIP), SetFill(1, 0),
@@ -1111,7 +1112,8 @@ static constexpr NWidgetPart _nested_found_town_widgets[] = {
NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetDataTip(STR_FOUND_TOWN_NAME_TITLE, STR_NULL),
NWidget(WWT_EDITBOX, COLOUR_GREY, WID_TF_TOWN_NAME_EDITBOX), SetDataTip(STR_FOUND_TOWN_NAME_EDITOR_TITLE, STR_FOUND_TOWN_NAME_EDITOR_HELP), SetFill(1, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_TF_TOWN_NAME_RANDOM), SetDataTip(STR_FOUND_TOWN_NAME_RANDOM_BUTTON, STR_FOUND_TOWN_NAME_RANDOM_TOOLTIP), SetFill(1, 0),
EndContainer(),
NWidget(NWID_VERTICAL), SetPIP(0, WidgetDimensions::unscaled.vsep_normal, 0), SetPadding(WidgetDimensions::unscaled.picker),
/* Town size selection. */
NWidget(WWT_LABEL, COLOUR_DARK_GREEN), SetDataTip(STR_FOUND_TOWN_INITIAL_SIZE_TITLE, STR_NULL),
NWidget(NWID_VERTICAL),
@@ -1141,6 +1143,7 @@ static constexpr NWidgetPart _nested_found_town_widgets[] = {
EndContainer(),
EndContainer(),
EndContainer(),
EndContainer(),
};
/** Found a town window class. */