1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 14:24:33 +01:00

Integrate gKeyboardShortcutChangeId

This commit is contained in:
Ted John
2016-09-05 21:04:22 +01:00
parent 3c5d4adcf0
commit 2dc315f228
3 changed files with 10 additions and 4 deletions

View File

@@ -31,6 +31,8 @@
#include "../platform/platform.h"
#include "../ride/track_paint.h"
uint8 gKeyboardShortcutChangeId;
typedef void (*shortcut_action)();
static const shortcut_action shortcut_table[SHORTCUT_COUNT];
@@ -52,7 +54,7 @@ void keyboard_shortcut_set(int key)
}
// Map shortcut to this key
gShortcutKeys[RCT2_GLOBAL(0x009DE511, uint8)] = key;
gShortcutKeys[gKeyboardShortcutChangeId] = key;
window_close_by_class(WC_CHANGE_KEYBOARD_SHORTCUT);
window_invalidate_by_class(WC_KEYBOARD_SHORTCUT_LIST);
config_shortcut_keys_save();

View File

@@ -19,6 +19,9 @@
#define SHORTCUT_UNDEFINED 0xFFFF
/** The current shortcut being changed. */
extern uint8 gKeyboardShortcutChangeId;
void keyboard_shortcut_set(int key);
void keyboard_shortcut_handle(int key);
void keyboard_shortcut_handle_command(int shortcutIndex);