diff options
author | yexo <yexo@openttd.org> | 2010-07-03 21:43:44 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-07-03 21:43:44 +0000 |
commit | 26be68ae9823b7a078c8251f70038d98961388bc (patch) | |
tree | dcd4778a53008b1805224ae3143dd7511adb3b20 /src/airport_gui.cpp | |
parent | 9be9302cdbe5e23ad7565e7d76b9ac2414fb0796 (diff) | |
download | openttd-26be68ae9823b7a078c8251f70038d98961388bc.tar.xz |
(svn r20070) -Feature: when none of the open windows handles a keypress, try all toolbars for global hotkeys
Users that have run a version between r20056 and r20068 should delete their hotkeys.cfg to reset the terraform toolbar hotkeys to default
Diffstat (limited to 'src/airport_gui.cpp')
-rw-r--r-- | src/airport_gui.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index 942f50180..4e2b5712b 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -176,6 +176,15 @@ void ShowBuildAirToolbar() AllocateWindowDescFront<BuildAirToolbarWindow>(&_air_toolbar_desc, TRANSPORT_AIR); } +EventState AirportToolbarGlobalHotkeys(uint16 key, uint16 keycode) +{ + int num = CheckHotkeyMatch<BuildAirToolbarWindow>(_airtoolbar_hotkeys, keycode, NULL, true); + if (num == -1) return ES_NOT_HANDLED; + ShowBuildAirToolbar(); + Window *w = FindWindowByClass(WC_BUILD_TOOLBAR); + return w->OnKeyPress(key, keycode); +} + /** Airport widgets in the airport picker window. */ enum AirportPickerWidgets { BAIRW_CLASS_DROPDOWN, |