summaryrefslogtreecommitdiff
path: root/aircraft_gui.c
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2005-01-10 14:56:26 +0000
committerdarkvater <darkvater@openttd.org>2005-01-10 14:56:26 +0000
commit83b2abb6d6da9ac7ef53d3d60617e95bf87c47e3 (patch)
tree7ca6c10af36fca82cd1d16d5f1be216f881c591e /aircraft_gui.c
parent29b4ab04c319f6b88e724ff79d73ca49f5676eaa (diff)
downloadopenttd-83b2abb6d6da9ac7ef53d3d60617e95bf87c47e3.tar.xz
(svn r1466) -Fix: oops, depot windows can of course also scroll horizontally. Thanks si-m1.
Diffstat (limited to 'aircraft_gui.c')
-rw-r--r--aircraft_gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/aircraft_gui.c b/aircraft_gui.c
index c2242a570..48a5f9c80 100644
--- a/aircraft_gui.c
+++ b/aircraft_gui.c
@@ -742,7 +742,7 @@ static int GetVehicleFromAircraftDepotWndPt(Window *w, int x, int y, Vehicle **v
xt = x / 74;
xm = x % 74;
- if (xt >= 4)
+ if (xt >= w->hscroll.cap)
return 1;
row = (y - 14) / 24;
@@ -750,7 +750,7 @@ static int GetVehicleFromAircraftDepotWndPt(Window *w, int x, int y, Vehicle **v
if (row >= w->vscroll.cap)
return 1;
- pos = (row + w->vscroll.pos) * 4 + xt;
+ pos = (row + w->vscroll.pos) * w->hscroll.cap + xt;
tile = w->window_number;
FOR_ALL_VEHICLES(v) {