diff options
Diffstat (limited to 'gui/Key.h')
-rw-r--r-- | gui/Key.h | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -32,13 +32,22 @@ namespace GUI { +// TODO/FIXME: Make use of Common::KeyState from common/keyboard.h, +// or even better, just completely replace this by it. +// To be able to do that, though, the code using GUI::Key would need to +// be adopted -- right now it uses SDL keycodes, and uses SDL_PushEvent +// to generated fake events. + class Key { public: - Key(int ascii, int keycode = 0, int flags = 0); + Key(int ascii); + Key(int ascii, int keycode, int flags = 0); Key(); - void setAscii(int ascii); - void setKeycode(int keycode); - void setFlags(int flags); + + void setKey(int ascii); + void setKey(int ascii, int keycode); + void setKey(int ascii, int keycode, int flags); + int ascii(); int keycode(); int flags(); |