summaryrefslogtreecommitdiff
path: root/src/hotkeys.h
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-07-03 21:43:44 +0000
committeryexo <yexo@openttd.org>2010-07-03 21:43:44 +0000
commit26be68ae9823b7a078c8251f70038d98961388bc (patch)
treedcd4778a53008b1805224ae3143dd7511adb3b20 /src/hotkeys.h
parent9be9302cdbe5e23ad7565e7d76b9ac2414fb0796 (diff)
downloadopenttd-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.h6
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 */