From e5bfc5660d35e408de764cde63bf376fbade37c5 Mon Sep 17 00:00:00 2001 From: alberth Date: Sat, 25 Jul 2009 11:32:53 +0000 Subject: (svn r16952) -Codechange: Use a label for the world population in the town directory window. --- src/town_gui.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/town_gui.cpp b/src/town_gui.cpp index 3f6f228af..924d47b6d 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -497,7 +497,8 @@ enum TownDirectoryWidgets { TDW_SORTPOPULATION, TDW_CENTERTOWN, TDW_SCROLLBAR, - TDW_EMPTYBOTTOM, + TDW_BOTTOM_PANEL, + TDW_BOTTOM_TEXT, TDW_RESIZEBOX, }; @@ -515,12 +516,14 @@ static const NWidgetPart _nested_town_directory_widgets[] = { EndContainer(), NWidget(WWT_PANEL, COLOUR_BROWN, TDW_CENTERTOWN), SetMinimalSize(196, 164), SetDataTip(0x0, STR_TOWN_DIRECTORY_LIST_TOOLTIP), SetFill(1, 0), SetResize(0, 10), EndContainer(), + NWidget(WWT_PANEL, COLOUR_BROWN, TDW_BOTTOM_PANEL), + NWidget(WWT_TEXT, COLOUR_BROWN, TDW_BOTTOM_TEXT), SetPadding(2, 0, 0, 2), SetMinimalSize(196, 12), SetFill(1, 0), SetDataTip(STR_EMPTY, STR_NULL), + EndContainer(), + EndContainer(), + NWidget(NWID_VERTICAL), + NWidget(WWT_SCROLLBAR, COLOUR_BROWN, TDW_SCROLLBAR), + NWidget(WWT_RESIZEBOX, COLOUR_BROWN, TDW_RESIZEBOX), EndContainer(), - NWidget(WWT_SCROLLBAR, COLOUR_BROWN, TDW_SCROLLBAR), - EndContainer(), - NWidget(NWID_HORIZONTAL), - NWidget(WWT_PANEL, COLOUR_BROWN, TDW_EMPTYBOTTOM), SetMinimalSize(196, 12), SetFill(1, 0), EndContainer(), - NWidget(WWT_RESIZEBOX, COLOUR_BROWN, TDW_RESIZEBOX), EndContainer(), }; @@ -636,9 +639,9 @@ public: } } break; - case TDW_EMPTYBOTTOM: + case TDW_BOTTOM_TEXT: SetDParam(0, GetWorldPopulation()); - DrawString(r.left + 3, r.right - 3, r.top + 2, STR_TOWN_POPULATION); + DrawString(r.left, r.right, r.top, STR_TOWN_POPULATION); break; } } @@ -671,7 +674,7 @@ public: resize->height = d.height; break; } - case TDW_EMPTYBOTTOM: { + case TDW_BOTTOM_TEXT: { SetDParam(0, 1000000000); // 10^9 Dimension d = GetStringBoundingBox(STR_TOWN_POPULATION); d.width += padding.width; -- cgit v1.2.3-70-g09d2