summaryrefslogtreecommitdiff
path: root/src/timetable_gui.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-11-04 00:08:57 +0000
committerbelugas <belugas@openttd.org>2007-11-04 00:08:57 +0000
commit56e6282f2f56d741634e30bba86fcfbd941bc285 (patch)
tree14a742a306f14c4d3afd56b725a7c6ffe7fb0e73 /src/timetable_gui.cpp
parent9e69fc8114012c85cc1194a2ae73fb716dc95dde (diff)
downloadopenttd-56e6282f2f56d741634e30bba86fcfbd941bc285.tar.xz
(svn r11374) -Codechange: Give meaning to the magical number that specifies the color of the text in a DrawString call.
Patch heavily based on BiBB's work (FS#1383)
Diffstat (limited to 'src/timetable_gui.cpp')
-rw-r--r--src/timetable_gui.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp
index 73292fcdb..e6ac218b9 100644
--- a/src/timetable_gui.cpp
+++ b/src/timetable_gui.cpp
@@ -141,8 +141,7 @@ static void DrawTimetableWindow(Window *w)
default: break;
}
- const byte colour = (i == selected) ? 0xC : 0x10;
- DrawString(2, y, STR_TIMETABLE_GO_TO, colour);
+ DrawString(2, y, STR_TIMETABLE_GO_TO, (i == selected) ? TC_WHITE : TC_BLACK);
order_id++;
@@ -162,8 +161,7 @@ static void DrawTimetableWindow(Window *w)
string = STR_TIMETABLE_TRAVEL_FOR;
}
- const byte colour = (i == selected) ? 0xC : 0x10;
- DrawString(12, y, string, colour);
+ DrawString(12, y, string, (i == selected) ? TC_WHITE : TC_BLACK);
if (final_order) break;
}
@@ -186,16 +184,16 @@ static void DrawTimetableWindow(Window *w)
if (total_time != 0) {
SetTimetableParams(0, 1, total_time);
- DrawString(2, y, complete ? STR_TIMETABLE_TOTAL_TIME : STR_TIMETABLE_TOTAL_TIME_INCOMPLETE, 0x10);
+ DrawString(2, y, complete ? STR_TIMETABLE_TOTAL_TIME : STR_TIMETABLE_TOTAL_TIME_INCOMPLETE, TC_BLACK);
}
}
y += 10;
if (v->lateness_counter == 0 || (!_patches.timetable_in_ticks && v->lateness_counter / DAY_TICKS == 0)) {
- DrawString(2, y, STR_TIMETABLE_STATUS_ON_TIME, 0x10);
+ DrawString(2, y, STR_TIMETABLE_STATUS_ON_TIME, TC_BLACK);
} else {
SetTimetableParams(0, 1, abs(v->lateness_counter));
- DrawString(2, y, v->lateness_counter < 0 ? STR_TIMETABLE_STATUS_EARLY : STR_TIMETABLE_STATUS_LATE, 0x10);
+ DrawString(2, y, v->lateness_counter < 0 ? STR_TIMETABLE_STATUS_EARLY : STR_TIMETABLE_STATUS_LATE, TC_BLACK);
}
}