summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2006-12-07 21:21:02 +0000
committerbelugas <belugas@openttd.org>2006-12-07 21:21:02 +0000
commit4b95605807cc5834918cae0d4f88248cdb05f07b (patch)
treede700febb7a53a8f32288a169d1a08c2f6c108ef
parenta90642f135fd2dc66bee79a2413c25053157d173 (diff)
downloadopenttd-4b95605807cc5834918cae0d4f88248cdb05f07b.tar.xz
(svn r7428) -Codechange: Give a more explicit name to the enum STATIONLIST_WIDGET_CARGONONE.
It is not "No Cargo selected", but rather station with no cargo waiting, thus STATIONLIST_WIDGET_NOCARGOWAITING. Hoping it is now clearer for everyone (mainly me...). Will fix the behaviour next time.
-rw-r--r--station_gui.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/station_gui.c b/station_gui.c
index 5d8fd1f15..2e882bcfa 100644
--- a/station_gui.c
+++ b/station_gui.c
@@ -28,7 +28,7 @@ enum StationListWidgets {
STATIONLIST_WIDGET_AIRPLANE,
STATIONLIST_WIDGET_SHIP,
STATIONLIST_WIDGET_CARGOSTART = 12,
- STATIONLIST_WIDGET_CARGONONE = 24,
+ STATIONLIST_WIDGET_NOCARGOWAITING = 24,
STATIONLIST_WIDGET_FACILALL = 26,
STATIONLIST_WIDGET_CARGOALL,
STATIONLIST_WIDGET_SORTBY,
@@ -277,7 +277,7 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
}
SetWindowWidgetLoweredState(w, STATIONLIST_WIDGET_FACILALL, facilities == (FACIL_TRAIN | FACIL_TRUCK_STOP | FACIL_BUS_STOP | FACIL_AIRPORT | FACIL_DOCK));
SetWindowWidgetLoweredState(w, STATIONLIST_WIDGET_CARGOALL, cargo_filter == CARGO_ALL_SELECTED);
- SetWindowWidgetLoweredState(w, STATIONLIST_WIDGET_CARGONONE, cargo_filter == CARGO_NONE_SELECTED);
+ SetWindowWidgetLoweredState(w, STATIONLIST_WIDGET_NOCARGOWAITING, cargo_filter == CARGO_NONE_SELECTED);
sl->sort_list = NULL;
sl->flags = SL_REBUILD;
@@ -324,7 +324,7 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
x += 14;
}
- cg_ofst = IsWindowWidgetLowered(w, STATIONLIST_WIDGET_CARGONONE) ? 1 : 0;
+ cg_ofst = IsWindowWidgetLowered(w, STATIONLIST_WIDGET_NOCARGOWAITING) ? 1 : 0;
DrawString(x + 2 + cg_ofst, y + 2 + cg_ofst, STR_ABBREV_NONE, 16);
x += 14;
cg_ofst = IsWindowWidgetLowered(w, STATIONLIST_WIDGET_CARGOALL) ? 1 : 0;
@@ -424,7 +424,7 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
for (i = 0; i < NUM_CARGO; i++) {
LowerWindowWidget(w, i + STATIONLIST_WIDGET_CARGOSTART);
}
- RaiseWindowWidget(w, STATIONLIST_WIDGET_CARGONONE);
+ RaiseWindowWidget(w, STATIONLIST_WIDGET_NOCARGOWAITING);
LowerWindowWidget(w, STATIONLIST_WIDGET_CARGOALL);
cargo_filter = CARGO_ALL_SELECTED;
@@ -446,7 +446,7 @@ static void PlayerStationsWndProc(Window *w, WindowEvent *e)
break;
default:
- if (e->we.click.widget >= STATIONLIST_WIDGET_CARGOSTART && e->we.click.widget <= STATIONLIST_WIDGET_CARGONONE) { //change cargo_filter
+ if (e->we.click.widget >= STATIONLIST_WIDGET_CARGOSTART && e->we.click.widget <= STATIONLIST_WIDGET_NOCARGOWAITING) { //change cargo_filter
if (_ctrl_pressed) {
TOGGLEBIT(cargo_filter, e->we.click.widget - STATIONLIST_WIDGET_CARGOSTART);
ToggleWidgetLoweredState(w, e->we.click.widget);