summaryrefslogtreecommitdiff
path: root/src/subsidy_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-03-25 20:16:09 +0000
committerrubidium <rubidium@openttd.org>2009-03-25 20:16:09 +0000
commit89ceed55bf2450aa9a2f070090a2cea87a035163 (patch)
tree39c29aa3814f2cd5340e50e31c204934f7aa2f37 /src/subsidy_gui.cpp
parente8d76e79ee8b58d9947c05eb9dcb53c3d0b4ec19 (diff)
downloadopenttd-89ceed55bf2450aa9a2f070090a2cea87a035163.tar.xz
(svn r15850) -Codechange: replace some magic constants with the less magic line height constant
Diffstat (limited to 'src/subsidy_gui.cpp')
-rw-r--r--src/subsidy_gui.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/subsidy_gui.cpp b/src/subsidy_gui.cpp
index 6c5686fc3..76d586ea7 100644
--- a/src/subsidy_gui.cpp
+++ b/src/subsidy_gui.cpp
@@ -34,7 +34,7 @@ struct SubsidyListWindow : Window {
uint num = 0;
for (const Subsidy *s = _subsidies; s != endof(_subsidies); s++) {
if (s->cargo_type != CT_INVALID && s->age < 12) {
- y -= 10;
+ y -= FONT_HEIGHT_NORMAL;
if (y < 0) {
this->HandleClick(s);
return;
@@ -44,7 +44,7 @@ struct SubsidyListWindow : Window {
}
if (num == 0) {
- y -= 10; // "None"
+ y -= FONT_HEIGHT_NORMAL; // "None"
if (y < 0) return;
}
@@ -53,7 +53,7 @@ struct SubsidyListWindow : Window {
for (const Subsidy *s = _subsidies; s != endof(_subsidies); s++) {
if (s->cargo_type != CT_INVALID && s->age >= 12) {
- y -= 10;
+ y -= FONT_HEIGHT_NORMAL;
if (y < 0) {
this->HandleClick(s);
return;
@@ -113,7 +113,7 @@ struct SubsidyListWindow : Window {
/* Section for drawing the offered subisidies */
DrawString(x, right, y, STR_2026_SUBSIDIES_ON_OFFER_FOR, TC_FROMSTRING);
- y += 10;
+ y += FONT_HEIGHT_NORMAL;
uint num = 0;
for (s = _subsidies; s != endof(_subsidies); s++) {
@@ -123,19 +123,19 @@ struct SubsidyListWindow : Window {
SetDParam(7, _date - ymd.day + 384 - s->age * 32);
DrawString(x + 2, right - 2, y, STR_2027_FROM_TO, TC_FROMSTRING);
- y += 10;
+ y += FONT_HEIGHT_NORMAL;
num++;
}
}
if (num == 0) {
DrawString(x + 2, right - 2, y, STR_202A_NONE, TC_FROMSTRING);
- y += 10;
+ y += FONT_HEIGHT_NORMAL;
}
/* Section for drawing the already granted subisidies */
DrawString(x, right, y + 1, STR_202B_SERVICES_ALREADY_SUBSIDISED, TC_FROMSTRING);
- y += 10;
+ y += FONT_HEIGHT_NORMAL;
num = 0;
for (s = _subsidies; s != endof(_subsidies); s++) {
@@ -147,7 +147,7 @@ struct SubsidyListWindow : Window {
/* Displays the two connected stations */
DrawString(x + 2, right - 2, y, STR_202C_FROM_TO, TC_FROMSTRING);
- y += 10;
+ y += FONT_HEIGHT_NORMAL;
num++;
}
}