summaryrefslogtreecommitdiff
path: root/src/touchmanager.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-09 18:07:17 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-09 18:07:17 +0300
commit7b5bf01f9fc6204ea94689ec15c41b1f56ab0e47 (patch)
tree13da3cf2656da04d042d445b0954ea1ad3fed865 /src/touchmanager.h
parent1324fd68e1a049fea14f38c0aece770778d1b225 (diff)
downloadmanaverse-7b5bf01f9fc6204ea94689ec15c41b1f56ab0e47.tar.gz
manaverse-7b5bf01f9fc6204ea94689ec15c41b1f56ab0e47.tar.bz2
manaverse-7b5bf01f9fc6204ea94689ec15c41b1f56ab0e47.tar.xz
manaverse-7b5bf01f9fc6204ea94689ec15c41b1f56ab0e47.zip
On the fly from settings show hide on screen joystick and buttons.
Diffstat (limited to 'src/touchmanager.h')
-rw-r--r--src/touchmanager.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/touchmanager.h b/src/touchmanager.h
index fb81a0beb..e3d76d910 100644
--- a/src/touchmanager.h
+++ b/src/touchmanager.h
@@ -23,6 +23,7 @@
#include "resources/image.h"
+#include "configlistener.h"
#include "keydata.h"
#include <guichan/mouseinput.hpp>
@@ -80,8 +81,9 @@ struct TouchItem final
typedef std::vector<TouchItem*> TouchItemVector;
typedef TouchItemVector::const_iterator TouchItemVectorCIter;
+typedef TouchItemVector::iterator TouchItemVectorIter;
-class TouchManager final
+class TouchManager final : public ConfigListener
{
public:
TouchManager();
@@ -120,6 +122,16 @@ class TouchManager final
void resize(int width, int height);
+ void unload(TouchItem *item);
+
+ void unloadTouchItem(TouchItem **unloadItem);
+
+ void optionChanged(const std::string &value);
+
+ void loadPad();
+
+ void loadButtons();
+
private:
TouchItem *mKeyboard;
TouchItem *mPad;
@@ -129,6 +141,8 @@ class TouchManager final
ImageCollection *mVertexes;
bool mActions[actionsSize];
bool mRedraw;
+ bool mShowJoystick;
+ bool mShowButtons;
};
extern TouchManager touchManager;