summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
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);
}
}
}