From f97cbb8294eb35fbd3af38fbe37ac35a82c64121 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 23 Jun 2007 00:05:32 +0000 Subject: Update GUI::Key constructs svn-id: r27643 --- gui/Key.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'gui/Key.h') diff --git a/gui/Key.h b/gui/Key.h index 5b7db903ba..9283a789ae 100644 --- a/gui/Key.h +++ b/gui/Key.h @@ -32,13 +32,18 @@ namespace GUI { +// TODO/FIXME: Make use of Common::KeyState from common/keyboard.h + 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(); -- cgit v1.2.3 From 2bbe67afdf4d4df36fc100690cf87c8a75d5a354 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 23 Jun 2007 10:06:39 +0000 Subject: Added more flexible KeyState constructor; updated comment in gui/Key.h svn-id: r27654 --- gui/Key.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'gui/Key.h') diff --git a/gui/Key.h b/gui/Key.h index 9283a789ae..663293886b 100644 --- a/gui/Key.h +++ b/gui/Key.h @@ -32,7 +32,11 @@ namespace GUI { -// TODO/FIXME: Make use of Common::KeyState from common/keyboard.h +// 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: -- cgit v1.2.3