summaryrefslogtreecommitdiff
path: root/src/town_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-12-08 17:18:51 +0000
committerfrosch <frosch@openttd.org>2012-12-08 17:18:51 +0000
commitb533523258dfd943caa307d28413693bcaa64007 (patch)
tree1236d0e560354d9b22d34269ba5ff99265a94cf6 /src/town_gui.cpp
parent18a5ba4ad7967c537854a3061df9e600c8f55bf7 (diff)
downloadopenttd-b533523258dfd943caa307d28413693bcaa64007.tar.xz
(svn r24801) -Codechange: Add functions to set integral DParams to suitable values for size computations.
Diffstat (limited to 'src/town_gui.cpp')
-rw-r--r--src/town_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index ad9ee0605..490bca5ed 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -780,7 +780,7 @@ public:
assert(t != NULL);
SetDParam(0, t->index);
- SetDParam(1, 10000000); // 10^7
+ SetDParamMaxDigits(1, 8);
d = maxdim(d, GetStringBoundingBox(STR_TOWN_DIRECTORY_TOWN));
}
Dimension icon_size = GetSpriteSize(SPR_TOWN_RATING_GOOD);
@@ -794,7 +794,7 @@ public:
break;
}
case WID_TD_WORLD_POPULATION: {
- SetDParam(0, 1000000000); // 10^9
+ SetDParamMaxDigits(0, 10);
Dimension d = GetStringBoundingBox(STR_TOWN_POPULATION);
d.width += padding.width;
d.height += padding.height;