summaryrefslogtreecommitdiff
path: root/src/build_vehicle_gui.cpp
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-06-22 10:57:53 +0000
committertruelight <truelight@openttd.org>2007-06-22 10:57:53 +0000
commit6159f58948763ed39a457e6ff825a735eea06b23 (patch)
treeae20bc955475b4b7263a0d0b7d3d32e3f75478fe /src/build_vehicle_gui.cpp
parent38da76acb749aafbf0761bae9d29d9309ade8568 (diff)
downloadopenttd-6159f58948763ed39a457e6ff825a735eea06b23.tar.xz
(svn r10265) -Feature: allow double-clicking on certain places: build-vehicle and town-action
Diffstat (limited to 'src/build_vehicle_gui.cpp')
-rw-r--r--src/build_vehicle_gui.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp
index 94647881d..5535af88d 100644
--- a/src/build_vehicle_gui.cpp
+++ b/src/build_vehicle_gui.cpp
@@ -996,6 +996,14 @@ static void NewVehicleWndProc(Window *w, WindowEvent *e)
BuildVehicleClickEvent(w, e);
break;
+ case WE_DOUBLE_CLICK:
+ if (e->we.click.widget == BUILD_VEHICLE_WIDGET_LIST) {
+ /* When double clicking, we want to buy a vehicle */
+ e->we.click.widget = BUILD_VEHICLE_WIDGET_BUILD;
+ BuildVehicleClickEvent(w, e);
+ }
+ break;
+
case WE_ON_EDIT_TEXT: {
if (e->we.edittext.str[0] != '\0') {
StringID str = STR_NULL;