summaryrefslogtreecommitdiff
path: root/station_gui.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2006-09-28 23:05:03 +0000
committerbjarni <bjarni@openttd.org>2006-09-28 23:05:03 +0000
commit1f2ed9d731cfc0b1b7a03b843175238a9a64948d (patch)
treeb9c5f2fcf23245015608eafaccdf02f62b94eda6 /station_gui.c
parent9b7fc334e2e7799dd1cb79e71c128e5d5c7cfa6e (diff)
downloadopenttd-1f2ed9d731cfc0b1b7a03b843175238a9a64948d.tar.xz
(svn r6562) -Codechange: merged the vehicle list window widget arrays
It made no sense to maintain 8 nearly identically arrays when a single one can do the job Also made the two buttons always use half of the bottom width each, even when resizing
Diffstat (limited to 'station_gui.c')
-rw-r--r--station_gui.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/station_gui.c b/station_gui.c
index a7d9b1143..4c4dad665 100644
--- a/station_gui.c
+++ b/station_gui.c
@@ -17,6 +17,7 @@
#include "variables.h"
#include "vehicle_gui.h"
#include "date.h"
+#include "vehicle.h"
typedef int CDECL StationSortListingTypeFunction(const void*, const void*);
@@ -679,13 +680,13 @@ static void StationViewWndProc(Window *w, WindowEvent *e)
case 10: { /* Show a list of scheduled trains to this station */
const Station *st = GetStation(w->window_number);
- ShowPlayerTrains(st->owner, w->window_number);
+ ShowVehicleListWindow(st->owner, w->window_number, VEH_Train);
break;
}
case 11: { /* Show a list of scheduled road-vehicles to this station */
const Station *st = GetStation(w->window_number);
- ShowPlayerRoadVehicles(st->owner, w->window_number);
+ ShowVehicleListWindow(st->owner, w->window_number, VEH_Road);
break;
}
@@ -693,7 +694,7 @@ static void StationViewWndProc(Window *w, WindowEvent *e)
const Station *st = GetStation(w->window_number);
/* Since oilrigs have no owners, show the scheduled aircraft of current player */
PlayerID owner = (st->owner == OWNER_NONE) ? _current_player : st->owner;
- ShowPlayerAircraft(owner, w->window_number);
+ ShowVehicleListWindow(owner, w->window_number, VEH_Aircraft);
break;
}
@@ -701,7 +702,7 @@ static void StationViewWndProc(Window *w, WindowEvent *e)
const Station *st = GetStation(w->window_number);
/* Since oilrigs/bouys have no owners, show the scheduled ships of current player */
PlayerID owner = (st->owner == OWNER_NONE) ? _current_player : st->owner;
- ShowPlayerShips(owner, w->window_number);
+ ShowVehicleListWindow(owner, w->window_number, VEH_Ship);
break;
}
}