diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-04-18 02:58:23 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-04-18 02:58:23 +0300 |
commit | 23f87c10db7e6b149e9e1f351e1a82516c545df7 (patch) | |
tree | a64be1829568f16108c0a39c4a9a5e3957466831 /src/gui/sdlinput.h | |
parent | 0f82a8b4a599fbeb2663680deb406bbc15a67576 (diff) | |
download | manaplus-23f87c10db7e6b149e9e1f351e1a82516c545df7.tar.gz manaplus-23f87c10db7e6b149e9e1f351e1a82516c545df7.tar.bz2 manaplus-23f87c10db7e6b149e9e1f351e1a82516c545df7.tar.xz manaplus-23f87c10db7e6b149e9e1f351e1a82516c545df7.zip |
First step for dehardcode input handling in widgets.
Now widgets can check for input event.
Diffstat (limited to 'src/gui/sdlinput.h')
-rw-r--r-- | src/gui/sdlinput.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/sdlinput.h b/src/gui/sdlinput.h index af74534c3..c3c0628ff 100644 --- a/src/gui/sdlinput.h +++ b/src/gui/sdlinput.h @@ -68,6 +68,8 @@ #include <guichan/mouseinput.hpp> #include <guichan/platform.hpp> +class KeyInput; + namespace Key { enum @@ -150,13 +152,15 @@ public: virtual void _pollInput() { } + virtual KeyInput dequeueKeyInput2(); + + virtual gcn::KeyInput dequeueKeyInput() + { return gcn::KeyInput(); } // Inherited from Input virtual bool isKeyQueueEmpty(); - virtual gcn::KeyInput dequeueKeyInput(); - virtual bool isMouseQueueEmpty(); virtual gcn::MouseInput dequeueMouseInput(); @@ -180,7 +184,7 @@ protected: */ int convertKeyCharacter(SDL_Event event); - std::queue<gcn::KeyInput> mKeyInputQueue; + std::queue<KeyInput> mKeyInputQueue; std::queue<gcn::MouseInput> mMouseInputQueue; bool mMouseDown; |