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/hotkeys.h | |
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/hotkeys.h')
-rw-r--r-- | src/hotkeys.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/hotkeys.h b/src/hotkeys.h index e63cc573f..240894b8d 100644 --- a/src/hotkeys.h +++ b/src/hotkeys.h @@ -13,6 +13,7 @@ #define HOTKEYS_H #include "core/smallvec_type.hpp" +#include "gfx_type.h" /** * All data for a single hotkey. The name (for saving/loading a configfile), @@ -115,7 +116,7 @@ int CheckHotkeyMatch(Hotkey<T> *list, uint16 keycode, T *w, bool global_only = f { while (list->num != -1) { if (list->keycodes.Contains(keycode | WKC_GLOBAL_HOTKEY) || (!global_only && list->keycodes.Contains(keycode))) { - if (list->callback != NULL) (w->*(list->callback->callback))(-1); + if (!global_only && list->callback != NULL) (w->*(list->callback->callback))(-1); return list->num; } list++; @@ -126,4 +127,7 @@ int CheckHotkeyMatch(Hotkey<T> *list, uint16 keycode, T *w, bool global_only = f void LoadHotkeysFromConfig(); void SaveHotkeysToConfig(); + +void HandleGlobalHotkeys(uint16 key, uint16 keycode); + #endif /* HOTKEYS_H */ |