summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-18 16:27:04 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-18 16:27:04 +0300
commit03c74387d37cefcc18e59db203d17d78cda40e8e (patch)
tree74e7291b97b67bb75984f5f5819944f058a9ace7 /src/input
parent3d7cb45edeb4f75bad321d54d84fe2d13b487db9 (diff)
downloadmv-03c74387d37cefcc18e59db203d17d78cda40e8e.tar.gz
mv-03c74387d37cefcc18e59db203d17d78cda40e8e.tar.bz2
mv-03c74387d37cefcc18e59db203d17d78cda40e8e.tar.xz
mv-03c74387d37cefcc18e59db203d17d78cda40e8e.zip
Move mousebutton into separate file.
Diffstat (limited to 'src/input')
-rw-r--r--src/input/mouseinput.h21
-rw-r--r--src/input/multitouchmanager.cpp2
2 files changed, 7 insertions, 16 deletions
diff --git a/src/input/mouseinput.h b/src/input/mouseinput.h
index a90a1366d..3e24543a8 100644
--- a/src/input/mouseinput.h
+++ b/src/input/mouseinput.h
@@ -66,6 +66,8 @@
#include "input/mouseinput.h"
+#include "events/mousebutton.h"
+
#include "localconsts.h"
class MouseInput final
@@ -73,7 +75,7 @@ class MouseInput final
public:
MouseInput() :
mType(0),
- mButton(0),
+ mButton(MouseButton::EMPTY),
mTimeStamp(0),
mX(0),
mY(0),
@@ -97,17 +99,6 @@ class MouseInput final
WHEEL_MOVED_UP
};
- /**
- * Mouse button types.
- */
- enum
- {
- EMPTY = 0,
- LEFT,
- RIGHT,
- MIDDLE
- };
-
void setType(unsigned int type)
{
mType = type;
@@ -118,12 +109,12 @@ class MouseInput final
return mType;
}
- void setButton(unsigned int button)
+ void setButton(MouseButton::Type button)
{
mButton = button;
}
- unsigned int getButton() const
+ MouseButton::Type getButton() const
{
return mButton;
}
@@ -190,7 +181,7 @@ class MouseInput final
/**
* Holds the button of the mouse input.
*/
- unsigned int mButton;
+ MouseButton::Type mButton;
/**
* Holds the timestamp of the mouse input. Used to
diff --git a/src/input/multitouchmanager.cpp b/src/input/multitouchmanager.cpp
index c1626da41..a05e51709 100644
--- a/src/input/multitouchmanager.cpp
+++ b/src/input/multitouchmanager.cpp
@@ -82,7 +82,7 @@ void MultiTouchManager::checkDevice(const long touchId,
const int w = mainGraphics->mWidth;
const int h = mainGraphics->mHeight;
guiInput->simulateMouseClick(finger0.x * w, finger0.y * h,
- MouseInput::RIGHT);
+ MouseButton::RIGHT);
}
}
}