summaryrefslogtreecommitdiff
path: root/src/vehicle_gui.cpp
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2010-12-21 14:01:44 +0000
committerterkhen <terkhen@openttd.org>2010-12-21 14:01:44 +0000
commit884b44990a7effe740e705a0183d28f38bfa2b9d (patch)
tree856175f17d72b3caa2048207b0547a7815700198 /src/vehicle_gui.cpp
parentea7c33ca6d6e81be028816b88da3040086811fad (diff)
downloadopenttd-884b44990a7effe740e705a0183d28f38bfa2b9d.tar.xz
(svn r21570) -Add: Allow to select a vehicle and the following chain with a keyboard shortcut.
Diffstat (limited to 'src/vehicle_gui.cpp')
-rw-r--r--src/vehicle_gui.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp
index 0605d940f..cd4febcfa 100644
--- a/src/vehicle_gui.cpp
+++ b/src/vehicle_gui.cpp
@@ -766,7 +766,10 @@ struct RefitWindow : public Window {
}
/* If the selection is not correct, clear it. */
- if (this->num_vehicles != 0) break;
+ if (this->num_vehicles != 0) {
+ if (_ctrl_pressed) this->num_vehicles = UINT8_MAX;
+ break;
+ }
/* FALL THROUGH */
}
@@ -787,7 +790,7 @@ struct RefitWindow : public Window {
this->click_x = GetClickPosition(pt.x - nwi->pos_x);
this->SetSelectedVehicles(pt.x - nwi->pos_x);
this->SetWidgetDirty(VRW_VEHICLE_PANEL_DISPLAY);
- SetObjectToPlaceWnd(SPR_CURSOR_MOUSE, PAL_NONE, HT_DRAG, this);
+ if (!_ctrl_pressed) SetObjectToPlaceWnd(SPR_CURSOR_MOUSE, PAL_NONE, HT_DRAG, this);
break;
}