diff options
author | truelight <truelight@openttd.org> | 2007-06-22 10:57:53 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2007-06-22 10:57:53 +0000 |
commit | 6159f58948763ed39a457e6ff825a735eea06b23 (patch) | |
tree | ae20bc955475b4b7263a0d0b7d3d32e3f75478fe /src/build_vehicle_gui.cpp | |
parent | 38da76acb749aafbf0761bae9d29d9309ade8568 (diff) | |
download | openttd-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.cpp | 8 |
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; |