summaryrefslogtreecommitdiff
path: root/road_gui.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2005-01-12 00:50:08 +0000
committerdarkvater <darkvater@openttd.org>2005-01-12 00:50:08 +0000
commit38b0a06d85d534516d6252119e967f1ec1142baf (patch)
treea7425691b62a7c765424debd5836b6b271338b0e /road_gui.c
parent1f84d14b47fcf717737fc0f3ea16c019fec18b82 (diff)
downloadopenttd-38b0a06d85d534516d6252119e967f1ec1142baf.tar.xz
(svn r1485) -Fix: [1031451] Catchment area shows when buying sign. Catchment area wasn't reset when road station window was unselected
-Fix: small GUI glitch in terraform toolbar
Diffstat (limited to 'road_gui.c')
-rw-r--r--road_gui.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/road_gui.c b/road_gui.c
index 263acb168..9633a1c3e 100644
--- a/road_gui.c
+++ b/road_gui.c
@@ -399,28 +399,23 @@ static void ShowRoadDepotPicker()
AllocateWindowDesc(&_build_road_depot_desc);
}
-static void RoadStationPickerWndProc(Window *w, WindowEvent *e) {
-
- int rad;
-
+static void RoadStationPickerWndProc(Window *w, WindowEvent *e)
+{
switch(e->event) {
case WE_PAINT: {
int image;
+ if (WP(w,def_d).close) return;
+
w->click_state = ((1<<3) << _road_station_picker_orientation) |
((1<<7) << _station_show_coverage);
DrawWindowWidgets(w);
- SetTileSelectSize(1, 1);
-
- if (_patches.modified_catchment) {
- rad = CA_TRUCK; // = CA_BUS
- } else {
- rad = 4;
- }
-
- if (_station_show_coverage)
- SetTileSelectBigSize(-rad, -rad, 2*rad, 2*rad);
+ if (_station_show_coverage) {
+ int rad = _patches.modified_catchment ? CA_TRUCK /* = CA_BUS */ : 4;
+ SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
+ } else
+ SetTileSelectSize(1, 1);
image = (w->window_class == WC_BUS_STATION) ? 0x47 : 0x43;