summaryrefslogtreecommitdiff
path: root/src/group_gui.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-07 15:20:31 +0000
committerrubidium <rubidium@openttd.org>2007-08-07 15:20:31 +0000
commitc46e445e69f50d5b5a95e3e46fb3eed1efdb7656 (patch)
treed96722811d3b8b7cb54fe12d32dc41147a3a4159 /src/group_gui.cpp
parenta7e37d8592d702b06679eba14a386dd779b61786 (diff)
downloadopenttd-c46e445e69f50d5b5a95e3e46fb3eed1efdb7656.tar.xz
(svn r10820) -Codechange: make negative currencies red and restore the colour from before the currency was printed; this removes the need to make two strings for printing currencies (one for positive currencies and one for negative currencies).
-Fix [FS#1036]: do not use green for currencies as it is practically unreadable on CRT monitors.
Diffstat (limited to 'src/group_gui.cpp')
-rw-r--r--src/group_gui.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/group_gui.cpp b/src/group_gui.cpp
index 3e6edc820..e17d896d0 100644
--- a/src/group_gui.cpp
+++ b/src/group_gui.cpp
@@ -451,36 +451,20 @@ static void GroupWndProc(Window *w, WindowEvent *e)
max = min(w->vscroll2.pos + w->vscroll2.cap, gv->l.list_length);
for (i = w->vscroll2.pos ; i < max ; ++i) {
const Vehicle* v = gv->sort_list[i];
- StringID str;
assert(v->type == gv->vehicle_type && v->owner == owner);
DrawVehicleImage(v, x + 19, y2 + 6, w->hscroll.cap, 0, gv->vehicle_sel);
DrawVehicleProfitButton(v, x, y2 + 13);
- if (IsVehicleInDepot(v)) {
- str = STR_021F;
- } else {
- str = v->age > v->max_age - 366 ? STR_00E3 : STR_00E2;
- }
SetDParam(0, v->unitnumber);
- DrawString(x, y2 + 2, str, 0);
+ DrawString(x, y2 + 2, IsVehicleInDepot(v) ? STR_021F : (v->age > v->max_age - 366 ? STR_00E3 : STR_00E2), 0);
if (w->resize.step_height == PLY_WND_PRC__SIZE_OF_ROW_BIG2) DrawSmallOrderList(v, x + 138, y2);
- if (v->profit_this_year < 0) {
- str = v->profit_last_year < 0 ?
- STR_PROFIT_BAD_THIS_YEAR_BAD_LAST_YEAR :
- STR_PROFIT_BAD_THIS_YEAR_GOOD_LAST_YEAR;
- } else {
- str = v->profit_last_year < 0 ?
- STR_PROFIT_GOOD_THIS_YEAR_BAD_LAST_YEAR :
- STR_PROFIT_GOOD_THIS_YEAR_GOOD_LAST_YEAR;
- }
-
SetDParam(0, v->profit_this_year);
SetDParam(1, v->profit_last_year);
- DrawString(x + 19, y2 + w->resize.step_height - 8, str, 0);
+ DrawString(x + 19, y2 + w->resize.step_height - 8, STR_0198_PROFIT_THIS_YEAR_LAST_YEAR, 0);
if (IsValidGroupID(v->group_id)) {
SetDParam(0, v->group_id);