summaryrefslogtreecommitdiff
path: root/src/touchmanager.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-06 20:11:49 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-06 20:21:25 +0300
commit23d29ec55093cd95c9084965a179ef70da2af150 (patch)
treebc579bc2dcc30fb588926a64d4ef1415e281492c /src/touchmanager.h
parent17bb7a5de4b9406f1a02d092ae590ab71b7265ba (diff)
downloadmv-23d29ec55093cd95c9084965a179ef70da2af150.tar.gz
mv-23d29ec55093cd95c9084965a179ef70da2af150.tar.bz2
mv-23d29ec55093cd95c9084965a179ef70da2af150.tar.xz
mv-23d29ec55093cd95c9084965a179ef70da2af150.zip
Add support for draw broders for on screen buttons.
Diffstat (limited to 'src/touchmanager.h')
-rw-r--r--src/touchmanager.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/touchmanager.h b/src/touchmanager.h
index 4c2339e15..ec4c46bb3 100644
--- a/src/touchmanager.h
+++ b/src/touchmanager.h
@@ -35,7 +35,9 @@
#include "localconsts.h"
class ImageCollection;
+class ImageRect;
class MouseInput;
+class Skin;
typedef void (*TouchFuncPtr) (const MouseInput &mouseInput);
@@ -43,13 +45,16 @@ const int actionsSize = Input::KEY_TOTAL;
struct TouchItem final
{
- TouchItem(const gcn::Rectangle rect0, Image *const img, int x0, int y0,
+ TouchItem(const gcn::Rectangle rect0, ImageRect *const images0,
+ int x0, int y0, int width0, int height0,
TouchFuncPtr ptrAll, TouchFuncPtr ptrPressed,
TouchFuncPtr ptrReleased, TouchFuncPtr ptrOut) :
rect(rect0),
- image(img),
+ images(images0),
x(x0),
y(y0),
+ width(width0),
+ height(height0),
funcAll(ptrAll),
funcPressed(ptrPressed),
funcReleased(ptrReleased),
@@ -60,9 +65,11 @@ struct TouchItem final
A_DELETE_COPY(TouchItem)
gcn::Rectangle rect;
- Image *image;
+ ImageRect *images;
int x;
int y;
+ int width;
+ int height;
TouchFuncPtr funcAll;
TouchFuncPtr funcPressed;
TouchFuncPtr funcReleased;
@@ -90,13 +97,14 @@ class TouchManager final
void init();
- void loadTouchItem(TouchItem **item, std::string name, int type,
+ void loadTouchItem(TouchItem **item, std::string name,
+ int type, int width, int height,
TouchFuncPtr fAll, TouchFuncPtr fPressed,
TouchFuncPtr fReleased, TouchFuncPtr fOut);
void clear();
- void unloadTouchItem(TouchItem **item0);
+// void unloadTouchItem(TouchItem **item0);
void draw();