summaryrefslogtreecommitdiff
path: root/src/input/mouseinput.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/input/mouseinput.h')
-rw-r--r--src/input/mouseinput.h21
1 files changed, 6 insertions, 15 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