diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-18 16:35:36 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-18 16:35:36 +0300 |
commit | 0d5fa0bc658e46269128bf23a9e981dfd9169de6 (patch) | |
tree | 913c8cb105ebfe8c37fa65a1a74b92e160e49364 /src/input | |
parent | 03c74387d37cefcc18e59db203d17d78cda40e8e (diff) | |
download | manaplus-0d5fa0bc658e46269128bf23a9e981dfd9169de6.tar.gz manaplus-0d5fa0bc658e46269128bf23a9e981dfd9169de6.tar.bz2 manaplus-0d5fa0bc658e46269128bf23a9e981dfd9169de6.tar.xz manaplus-0d5fa0bc658e46269128bf23a9e981dfd9169de6.zip |
Use mouseeventtype in mouseinput.
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/mouseinput.h | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/input/mouseinput.h b/src/input/mouseinput.h index 3e24543a8..284116db2 100644 --- a/src/input/mouseinput.h +++ b/src/input/mouseinput.h @@ -67,6 +67,7 @@ #include "input/mouseinput.h" #include "events/mousebutton.h" +#include "events/mouseeventtype.h" #include "localconsts.h" @@ -74,7 +75,7 @@ class MouseInput final { public: MouseInput() : - mType(0), + mType(MouseEventType::MOVED), mButton(MouseButton::EMPTY), mTimeStamp(0), mX(0), @@ -86,25 +87,12 @@ class MouseInput final ~MouseInput() { } - /** - * Mouse input event types. This enum partially corresponds - * to the enum with event types in MouseEvent for easy mapping. - */ - enum - { - MOVED = 0, - PRESSED, - RELEASED, - WHEEL_MOVED_DOWN, - WHEEL_MOVED_UP - }; - - void setType(unsigned int type) + void setType(MouseEventType::Type type) { mType = type; } - unsigned int getType() const + MouseEventType::Type getType() const { return mType; } @@ -176,7 +164,7 @@ class MouseInput final /** * Holds the type of the mouse input. */ - unsigned int mType; + MouseEventType::Type mType; /** * Holds the button of the mouse input. |