diff --git a/src/lang/extra/english.txt b/src/lang/extra/english.txt index eef5da135d..e29493a747 100644 --- a/src/lang/extra/english.txt +++ b/src/lang/extra/english.txt @@ -2105,3 +2105,5 @@ STR_COMPANY_VIEW_SELL_SHARE_TOOLTIP :{BLACK}Sell 25% STR_ERROR_CAN_T_BUY_25_SHARE_IN_THIS :{WHITE}Can't buy 25% share in this company... STR_ERROR_CAN_T_SELL_25_SHARE_IN :{WHITE}Can't sell 25% share in this company... STR_ERROR_PROTECTED :{WHITE}This company is not old enough to trade shares yet... + +STR_TOWN_DIRECTORY_INFO :{BLACK}{STRING1}, Towns: {COMMA} diff --git a/src/town_gui.cpp b/src/town_gui.cpp index 6901ce90ad..b4cada27b2 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -872,7 +872,7 @@ static const NWidgetPart _nested_town_directory_widgets[] = { NWidget(WWT_PANEL, COLOUR_BROWN, WID_TD_LIST), SetDataTip(0x0, STR_TOWN_DIRECTORY_LIST_TOOLTIP), SetFill(1, 0), SetResize(1, 1), SetScrollbar(WID_TD_SCROLLBAR), EndContainer(), NWidget(WWT_PANEL, COLOUR_BROWN), - NWidget(WWT_TEXT, COLOUR_BROWN, WID_TD_WORLD_POPULATION), SetPadding(2, 0, 2, 2), SetMinimalTextLines(1, 0), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TOWN_POPULATION, STR_NULL), + NWidget(WWT_TEXT, COLOUR_BROWN, WID_TD_WORLD_POPULATION), SetPadding(2, 0, 2, 2), SetMinimalTextLines(1, 0), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TOWN_DIRECTORY_INFO, STR_NULL), EndContainer(), EndContainer(), NWidget(NWID_VERTICAL), @@ -982,7 +982,9 @@ public: { switch (widget) { case WID_TD_WORLD_POPULATION: - SetDParam(0, GetWorldPopulation()); + SetDParam(0, STR_TOWN_POPULATION); + SetDParam(1, GetWorldPopulation()); + SetDParam(2, Town::GetNumItems()); break; case WID_TD_SORT_CRITERIA: @@ -1090,8 +1092,10 @@ public: break; } case WID_TD_WORLD_POPULATION: { - SetDParamMaxDigits(0, 10); - Dimension d = GetStringBoundingBox(STR_TOWN_POPULATION); + SetDParam(0, STR_TOWN_POPULATION); + SetDParamMaxDigits(1, 10); + SetDParamMaxDigits(2, 5); + Dimension d = GetStringBoundingBox(STR_TOWN_DIRECTORY_INFO); d.width += padding.width; d.height += padding.height; *size = maxdim(*size, d);