diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-12-05 20:47:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-12-05 20:48:08 +0300 |
commit | bef65b44075a5c918821f1360804ff5f9f2a32ed (patch) | |
tree | 9cdbdf2e2b4abd8b102adb02c673aad9c22a886a /src/touchmanager.h | |
parent | eb37dba283cab99816c5d227ad3744a8bb19d2c2 (diff) | |
download | manaplus-bef65b44075a5c918821f1360804ff5f9f2a32ed.tar.gz manaplus-bef65b44075a5c918821f1360804ff5f9f2a32ed.tar.bz2 manaplus-bef65b44075a5c918821f1360804ff5f9f2a32ed.tar.xz manaplus-bef65b44075a5c918821f1360804ff5f9f2a32ed.zip |
add attack and cancel on screen buttons.
Diffstat (limited to 'src/touchmanager.h')
-rw-r--r-- | src/touchmanager.h | 15 |
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]; |