From bef65b44075a5c918821f1360804ff5f9f2a32ed Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 5 Dec 2012 20:47:16 +0300 Subject: add attack and cancel on screen buttons. --- src/touchactions.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/touchactions.cpp') diff --git a/src/touchactions.cpp b/src/touchactions.cpp index df18fd366..5f236ea4e 100644 --- a/src/touchactions.cpp +++ b/src/touchactions.cpp @@ -20,6 +20,7 @@ #include "touchactions.h" +#include "actionmanager.h" #include "being.h" #include "game.h" #include "keydata.h" @@ -33,6 +34,7 @@ #include "debug.h" +InputEvent tempEvent(0, 0); bool padClicked(false); #define impHandler(name) void name(const MouseInput &mouseInput) @@ -137,3 +139,30 @@ impHandler0(padUp) padClicked = false; moveChar(50, 50); } + +impHandler(attackClick) +{ + ActionManager::targetAttack(tempEvent); +} + +impHandler(attackUp) +{ +} + +impHandler(attackOut) +{ +} + +impHandler(cancelClick) +{ + ActionManager::stopAttack(tempEvent); +} + +impHandler(cancelUp) +{ +} + +impHandler(cancelOut) +{ +} + -- cgit v1.2.3-70-g09d2