diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-05-18 16:27:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-05-18 16:27:04 +0300 |
commit | 03c74387d37cefcc18e59db203d17d78cda40e8e (patch) | |
tree | 74e7291b97b67bb75984f5f5819944f058a9ace7 /src/input/mouseinput.h | |
parent | 3d7cb45edeb4f75bad321d54d84fe2d13b487db9 (diff) | |
download | manaverse-03c74387d37cefcc18e59db203d17d78cda40e8e.tar.gz manaverse-03c74387d37cefcc18e59db203d17d78cda40e8e.tar.bz2 manaverse-03c74387d37cefcc18e59db203d17d78cda40e8e.tar.xz manaverse-03c74387d37cefcc18e59db203d17d78cda40e8e.zip |
Move mousebutton into separate file.
Diffstat (limited to 'src/input/mouseinput.h')
-rw-r--r-- | src/input/mouseinput.h | 21 |
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 |