From 03c74387d37cefcc18e59db203d17d78cda40e8e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 18 May 2014 16:27:04 +0300 Subject: Move mousebutton into separate file. --- src/input/mouseinput.h | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'src/input/mouseinput.h') 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 -- cgit v1.2.3-70-g09d2