diff options
author | dominik <dominik@openttd.org> | 2004-08-10 16:54:34 +0000 |
---|---|---|
committer | dominik <dominik@openttd.org> | 2004-08-10 16:54:34 +0000 |
commit | ee4511a83604e0f9f3fff8ad36bd433f6262106c (patch) | |
tree | 62c3efe79026cbadc27ac04ef2264056019d4d69 /aircraft_gui.c | |
parent | 39267dbad5a5846b614c688e453c54ef24af4224 (diff) | |
download | openttd-ee4511a83604e0f9f3fff8ad36bd433f6262106c.tar.xz |
(svn r11) Feature: Copy/share orders now works from ship depot window for ships and hangar window for aircraft
Diffstat (limited to 'aircraft_gui.c')
-rw-r--r-- | aircraft_gui.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/aircraft_gui.c b/aircraft_gui.c index 2f0c5d446..7a13ec15a 100644 --- a/aircraft_gui.c +++ b/aircraft_gui.c @@ -694,12 +694,16 @@ static int GetVehicleFromAircraftDepotWndPt(Window *w, int x, int y, Vehicle **v static void AircraftDepotClickAircraft(Window *w, int x, int y) { Vehicle *v; + int mode = GetVehicleFromAircraftDepotWndPt(w, x, y, &v); - switch(GetVehicleFromAircraftDepotWndPt(w, x, y, &v)) { + // share / copy orders + if (_thd.place_mode && mode <= 0) { _place_clicked_vehicle = v; return; } + + switch(mode) { case 1: return; - case 0: + case 0: // start dragging of vehicle if (v != NULL) { WP(w,traindepot_d).sel = v->index; SetWindowDirty(w); @@ -707,11 +711,11 @@ static void AircraftDepotClickAircraft(Window *w, int x, int y) } break; - case -1: + case -1: // show info window ShowAircraftViewWindow(v); break; - case -2: + case -2: // click start/stop flag DoCommandP(v->tile, v->index, 0, NULL, CMD_START_STOP_AIRCRAFT | CMD_MSG(STR_A016_CAN_T_STOP_START_AIRCRAFT)); break; |