Pyrogenesis
trunk
|
Hotkey system. More...
Go to the source code of this file.
Functions | |
void | LoadHotkeys () |
void | UnloadHotkeys () |
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*.
InReaction HotkeyInputHandler | ( | const SDL_Event_ * | ev | ) |
bool HotkeyIsPressed | ( | const CStr & | keyname | ) |
void LoadHotkeys | ( | ) |
void UnloadHotkeys | ( | ) |
const int SDL_HOTKEYDOWN = SDL_USEREVENT |
const int SDL_HOTKEYUP = SDL_USEREVENT + 1 |