From 56e6282f2f56d741634e30bba86fcfbd941bc285 Mon Sep 17 00:00:00 2001 From: belugas Date: Sun, 4 Nov 2007 00:08:57 +0000 Subject: (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) --- src/train_gui.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/train_gui.cpp') diff --git a/src/train_gui.cpp b/src/train_gui.cpp index dce7e5e87..419e6bb26 100644 --- a/src/train_gui.cpp +++ b/src/train_gui.cpp @@ -124,7 +124,7 @@ static void TrainDetailsCargoTab(const Vehicle *v, int x, int y) SetDParam(3, _patches.freight_trains); str = FreightWagonMult(v->cargo_type) > 1 ? STR_FROM_MULT : STR_8813_FROM; } - DrawString(x, y, str, 0); + DrawString(x, y, str, TC_FROMSTRING); } } @@ -133,12 +133,12 @@ static void TrainDetailsInfoTab(const Vehicle *v, int x, int y) if (RailVehInfo(v->engine_type)->railveh_type == RAILVEH_WAGON) { SetDParam(0, v->engine_type); SetDParam(1, v->value); - DrawString(x, y, STR_882D_VALUE, 0x10); + DrawString(x, y, STR_882D_VALUE, TC_BLACK); } else { SetDParam(0, v->engine_type); SetDParam(1, v->build_year); SetDParam(2, v->value); - DrawString(x, y, STR_882C_BUILT_VALUE, 0x10); + DrawString(x, y, STR_882C_BUILT_VALUE, TC_BLACK); } } @@ -148,7 +148,7 @@ static void TrainDetailsCapacityTab(const Vehicle *v, int x, int y) SetDParam(0, v->cargo_type); SetDParam(1, v->cargo_cap); SetDParam(2, _patches.freight_trains); - DrawString(x, y, FreightWagonMult(v->cargo_type) > 1 ? STR_CAPACITY_MULT : STR_013F_CAPACITY, 0); + DrawString(x, y, FreightWagonMult(v->cargo_type) > 1 ? STR_CAPACITY_MULT : STR_013F_CAPACITY, TC_FROMSTRING); } } @@ -240,7 +240,7 @@ void DrawTrainDetails(const Vehicle *v, int x, int y, int vscroll_pos, uint16 vs } /* draw total cargo tab */ - DrawString(x, y + 2, STR_013F_TOTAL_CAPACITY_TEXT, 0); + DrawString(x, y + 2, STR_013F_TOTAL_CAPACITY_TEXT, TC_FROMSTRING); for (CargoID i = 0; i < NUM_CARGO; i++) { if (max_cargo[i] > 0 && --vscroll_pos < 0 && vscroll_pos > -vscroll_cap) { y += 14; @@ -249,10 +249,10 @@ void DrawTrainDetails(const Vehicle *v, int x, int y, int vscroll_pos, uint16 vs SetDParam(2, i); // {SHORTCARGO} #1 SetDParam(3, max_cargo[i]); // {SHORTCARGO} #2 SetDParam(4, _patches.freight_trains); - DrawString(x, y + 2, FreightWagonMult(i) > 1 ? STR_TOTAL_CAPACITY_MULT : STR_013F_TOTAL_CAPACITY, 0); + DrawString(x, y + 2, FreightWagonMult(i) > 1 ? STR_TOTAL_CAPACITY_MULT : STR_013F_TOTAL_CAPACITY, TC_FROMSTRING); } } SetDParam(0, v->cargo.FeederShare()); - DrawString(x, y + 15, STR_FEEDER_CARGO_VALUE, 0); + DrawString(x, y + 15, STR_FEEDER_CARGO_VALUE, TC_FROMSTRING); } } -- cgit v1.2.3-54-g00ecf