summaryrefslogtreecommitdiff
path: root/src/touchmanager.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-05 20:47:16 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-05 20:48:08 +0300
commitbef65b44075a5c918821f1360804ff5f9f2a32ed (patch)
tree9cdbdf2e2b4abd8b102adb02c673aad9c22a886a /src/touchmanager.h
parenteb37dba283cab99816c5d227ad3744a8bb19d2c2 (diff)
downloadplus-bef65b44075a5c918821f1360804ff5f9f2a32ed.tar.gz
plus-bef65b44075a5c918821f1360804ff5f9f2a32ed.tar.bz2
plus-bef65b44075a5c918821f1360804ff5f9f2a32ed.tar.xz
plus-bef65b44075a5c918821f1360804ff5f9f2a32ed.zip
add attack and cancel on screen buttons.
Diffstat (limited to 'src/touchmanager.h')
-rw-r--r--src/touchmanager.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/touchmanager.h b/src/touchmanager.h
index 8afd78c56..4c2339e15 100644
--- a/src/touchmanager.h
+++ b/src/touchmanager.h
@@ -23,6 +23,8 @@
#include "resources/image.h"
+#include "keydata.h"
+
#include <guichan/mouseinput.hpp>
#include <guichan/rectangle.hpp>
@@ -37,7 +39,7 @@ class MouseInput;
typedef void (*TouchFuncPtr) (const MouseInput &mouseInput);
-const int actionsSize = 10;
+const int actionsSize = Input::KEY_TOTAL;
struct TouchItem final
{
@@ -79,9 +81,16 @@ class TouchManager final
A_DELETE_COPY(TouchManager)
+ enum Types
+ {
+ NORMAL = 0,
+ LEFT = 1,
+ RIGHT = 2,
+ };
+
void init();
- void loadTouchItem(TouchItem **item, std::string name, bool type,
+ void loadTouchItem(TouchItem **item, std::string name, int type,
TouchFuncPtr fAll, TouchFuncPtr fPressed,
TouchFuncPtr fReleased, TouchFuncPtr fOut);
@@ -104,6 +113,8 @@ class TouchManager final
private:
TouchItem *mKeyboard;
TouchItem *mPad;
+ TouchItem *mAttack;
+ TouchItem *mCancel;
TouchItemVector mObjects;
ImageCollection *mVertexes;
bool mActions[actionsSize];