From 72ee43e9470c6fdbc6ed7ff92b85dfa5062c5762 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Tue, 6 Jan 2015 18:51:37 +0000 Subject: Added separate event handlers for mouse button clicks and mouse wheel movement. --- src/client/keyboard.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/client/keyboard.h') diff --git a/src/client/keyboard.h b/src/client/keyboard.h index 0742b9c..2ebb568 100644 --- a/src/client/keyboard.h +++ b/src/client/keyboard.h @@ -11,7 +11,7 @@ #include #include -#include "SDL/SDL.h" +#include "SDL2/SDL.h" #include "client/action.h" #include "client/key.h" @@ -29,10 +29,10 @@ public: Keyboard(); ~Keyboard(); - /// find a key on a keysym - Key *find(unsigned int keysym); + /// find a key by scancode + Key *find(unsigned int scancode); - /// find a key on name + /// find a key by name Key *find(std::string const & name); /// bind a string to a key, if str is empty, just list @@ -63,16 +63,16 @@ public: void save_binds() const; /// a key has been pressed - Key *press(unsigned int sym); + Key *press(const unsigned int scancode); /// a key has been pressed Key *press(Key *key); /// a key has been pressed - Key *release(unsigned int sym); + Key *release(const unsigned int scancode); /// convert SDL_keysym to a keystroke - static unsigned int translate_keysym(const int keysym, const int modifiers); + static unsigned int translate_keysym(const unsigned int keysym, const int modifiers); inline Keys & keys() { @@ -80,7 +80,7 @@ public: } private: - Key *add_key(const char *name, const unsigned int keysym, const char ascii = 0, const char *bind = 0); + Key *add_key(const unsigned int scancode, const char *name, const char ascii = 0, const char *bind = 0); Action *add_action(const char *name, Action::Identifier id, const char *description = 0); -- cgit v1.2.3