summaryrefslogtreecommitdiff
path: root/src/gui/sdlinput.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-04-18 02:58:23 +0300
committerAndrei Karas <akaras@inbox.ru>2012-04-18 02:58:23 +0300
commit23f87c10db7e6b149e9e1f351e1a82516c545df7 (patch)
treea64be1829568f16108c0a39c4a9a5e3957466831 /src/gui/sdlinput.h
parent0f82a8b4a599fbeb2663680deb406bbc15a67576 (diff)
downloadmanaverse-23f87c10db7e6b149e9e1f351e1a82516c545df7.tar.gz
manaverse-23f87c10db7e6b149e9e1f351e1a82516c545df7.tar.bz2
manaverse-23f87c10db7e6b149e9e1f351e1a82516c545df7.tar.xz
manaverse-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.h10
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;