summaryrefslogtreecommitdiff
path: root/train_gui.c
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2004-08-10 16:54:34 +0000
committerdominik <dominik@openttd.org>2004-08-10 16:54:34 +0000
commitee4511a83604e0f9f3fff8ad36bd433f6262106c (patch)
tree62c3efe79026cbadc27ac04ef2264056019d4d69 /train_gui.c
parent39267dbad5a5846b614c688e453c54ef24af4224 (diff)
downloadopenttd-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 'train_gui.c')
-rw-r--r--train_gui.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/train_gui.c b/train_gui.c
index ac093459f..c89a37b13 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -442,13 +442,14 @@ static void TrainDepotClickTrain(Window *w, int x, int y)
Vehicle *v;
mode = GetVehicleFromTrainDepotWndPt(w, x, y, &gdvp);
-
+
+ // share / copy orders
if (_thd.place_mode && mode <= 0) { _place_clicked_vehicle = gdvp.head; return; }
v = gdvp.wagon;
switch(mode) {
- case 0:
+ case 0: // start dragging of vehicle
sel = (int16)WP(w,traindepot_d).sel;
if (sel != -1) {
WP(w,traindepot_d).sel = INVALID_VEHICLE;
@@ -460,11 +461,11 @@ static void TrainDepotClickTrain(Window *w, int x, int y)
}
break;
- case -1:
+ case -1: // show info window
ShowTrainViewWindow(v);
break;
- case -2:
+ case -2: // click start/stop flag
DoCommandP(v->tile, v->index, 0, NULL, CMD_START_STOP_TRAIN | CMD_MSG(STR_883B_CAN_T_STOP_START_TRAIN));
break;
}