From 0d5fa0bc658e46269128bf23a9e981dfd9169de6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 18 May 2014 16:35:36 +0300 Subject: Use mouseeventtype in mouseinput. --- src/input/mouseinput.h | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'src/input/mouseinput.h') 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. -- cgit v1.2.3-60-g2f50