summaryrefslogtreecommitdiff
path: root/src/events/mouseevent.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-18 16:27:04 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-18 16:27:04 +0300
commit03c74387d37cefcc18e59db203d17d78cda40e8e (patch)
tree74e7291b97b67bb75984f5f5819944f058a9ace7 /src/events/mouseevent.h
parent3d7cb45edeb4f75bad321d54d84fe2d13b487db9 (diff)
downloadmanaverse-03c74387d37cefcc18e59db203d17d78cda40e8e.tar.gz
manaverse-03c74387d37cefcc18e59db203d17d78cda40e8e.tar.bz2
manaverse-03c74387d37cefcc18e59db203d17d78cda40e8e.tar.xz
manaverse-03c74387d37cefcc18e59db203d17d78cda40e8e.zip
Move mousebutton into separate file.
Diffstat (limited to 'src/events/mouseevent.h')
-rw-r--r--src/events/mouseevent.h20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/events/mouseevent.h b/src/events/mouseevent.h
index 213582f47..80267e776 100644
--- a/src/events/mouseevent.h
+++ b/src/events/mouseevent.h
@@ -66,6 +66,7 @@
#include "events/inputguievent.h"
+#include "events/mousebutton.h"
#include "events/mouseeventtype.h"
class Widget;
@@ -91,8 +92,8 @@ class MouseEvent: public InputGuiEvent
* It's set to zero if another button is used.
*/
MouseEvent(Widget *const source,
- MouseEventType::Type type,
- const unsigned int button,
+ const MouseEventType::Type type,
+ const MouseButton::Type button,
const int x,
const int y,
const int clickCount) :
@@ -110,7 +111,7 @@ class MouseEvent: public InputGuiEvent
*
* @return The button of the mouse event.
*/
- unsigned int getButton() const A_WARN_UNUSED
+ MouseButton::Type getButton() const A_WARN_UNUSED
{ return mButton; }
/**
@@ -158,17 +159,6 @@ class MouseEvent: public InputGuiEvent
void setY(int n)
{ mY = n; }
- /**
- * Mouse button types.
- */
- enum
- {
- EMPTY = 0,
- LEFT,
- RIGHT,
- MIDDLE
- };
-
protected:
/**
* Holds the type of the mouse event.
@@ -178,7 +168,7 @@ class MouseEvent: public InputGuiEvent
/**
* Holds the button of the mouse event.
*/
- unsigned int mButton;
+ MouseButton::Type mButton;
/**
* Holds the x-coordinate of the mouse event.