summaryrefslogtreecommitdiff
path: root/src/touchmanager.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-24 15:13:34 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-24 15:13:34 +0300
commitf71b05916f639b230ed7f484fdbeaee15599d7e0 (patch)
tree4f18ff68c3ec203d698cf649bbe6fdc68bd72959 /src/touchmanager.h
parent39d19da4f4e882e561c080ed443ddf596008649f (diff)
downloadmanaplus-f71b05916f639b230ed7f484fdbeaee15599d7e0.tar.gz
manaplus-f71b05916f639b230ed7f484fdbeaee15599d7e0.tar.bz2
manaplus-f71b05916f639b230ed7f484fdbeaee15599d7e0.tar.xz
manaplus-f71b05916f639b230ed7f484fdbeaee15599d7e0.zip
improve touchmanager class.
Diffstat (limited to 'src/touchmanager.h')
-rw-r--r--src/touchmanager.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/touchmanager.h b/src/touchmanager.h
index fc8a2923f..3dc1eda29 100644
--- a/src/touchmanager.h
+++ b/src/touchmanager.h
@@ -47,13 +47,13 @@ const int buttonsCount = 4;
struct TouchItem final
{
- TouchItem(const gcn::Rectangle rect0, int type0,
+ TouchItem(const gcn::Rectangle rect0, const int type0,
const std::string &eventPressed0,
const std::string &eventReleased0,
ImageRect *const images0, Image *const icon0,
- int x0, int y0, int width0, int height0,
- TouchFuncPtr ptrAll, TouchFuncPtr ptrPressed,
- TouchFuncPtr ptrReleased, TouchFuncPtr ptrOut) :
+ const int x0, const int y0, const int width0, const int height0,
+ const TouchFuncPtr ptrAll, const TouchFuncPtr ptrPressed,
+ const TouchFuncPtr ptrReleased, const TouchFuncPtr ptrOut) :
rect(rect0),
type(type0),
eventPressed(eventPressed0),
@@ -111,15 +111,15 @@ class TouchManager final : public ConfigListener
void init();
- void loadTouchItem(TouchItem **item, std::string name,
- std::string imageName,
- int x, int y, int width, int height,
+ void loadTouchItem(TouchItem **item, const std::string &name,
+ const std::string &imageName,
+ int x, int y, const int width, const int height,
int type, const std::string &eventPressed,
const std::string &eventReleased,
- TouchFuncPtr fAll = nullptr,
- TouchFuncPtr fPressed = nullptr,
- TouchFuncPtr fReleased = nullptr,
- TouchFuncPtr fOut = nullptr);
+ const TouchFuncPtr fAll = nullptr,
+ const TouchFuncPtr fPressed = nullptr,
+ const TouchFuncPtr fReleased = nullptr,
+ const TouchFuncPtr fOut = nullptr);
void clear();
@@ -135,9 +135,9 @@ class TouchManager final : public ConfigListener
mActions[index] = value;
}
- void resize(int width, int height);
+ void resize(const int width, const int height);
- void unload(TouchItem *item);
+ static void unload(TouchItem *const item);
void unloadTouchItem(TouchItem **unloadItem);
@@ -152,9 +152,9 @@ class TouchManager final : public ConfigListener
int getPadSize()
{ return (mJoystickSize + 2) * 50; }
- void setInGame(bool b);
+ void setInGame(const bool b);
- void setTempHide(bool b);
+ void setTempHide(const bool b);
void shutdown();