Pyrogenesis
13997
|
Hotkey system. More...
Go to the source code of this file.
Functions | |
void | LoadHotkeys () |
InReaction | HotkeyInputHandler (const SDL_Event_ *ev) |
bool | HotkeyIsPressed (const CStr &keyname) |
Variables | |
const int | SDL_HOTKEYDOWN = SDL_USEREVENT |
const int | SDL_HOTKEYUP = SDL_USEREVENT + 1 |
Hotkey system.
Hotkeys consist of a name (an arbitrary string), and a key mapping. The names and mappings are loaded from the config system (any config setting with the name prefix "hotkey."). When a hotkey is pressed or released, SDL_HOTKEYDOWN and SDL_HOTKEYUP events are triggered, with the hotkey name stored in ev.user.data1 as a const char*.
Definition in file Hotkey.h.
InReaction HotkeyInputHandler | ( | const SDL_Event_ * | ev | ) |
Definition at line 175 of file Hotkey.cpp.
bool HotkeyIsPressed | ( | const CStr & | keyname | ) |
Definition at line 400 of file Hotkey.cpp.
void LoadHotkeys | ( | ) |
Definition at line 145 of file Hotkey.cpp.
const int SDL_HOTKEYDOWN = SDL_USEREVENT |
const int SDL_HOTKEYUP = SDL_USEREVENT + 1 |