diff --git a/cocos/base/CCEventMouse.h b/cocos/base/CCEventMouse.h index 1c5af7eb22..926b60a6a0 100644 --- a/cocos/base/CCEventMouse.h +++ b/cocos/base/CCEventMouse.h @@ -29,17 +29,20 @@ #include "base/CCEvent.h" #include "math/CCGeometry.h" -#define MOUSE_BUTTON_LEFT 0 -#define MOUSE_BUTTON_RIGHT 1 -#define MOUSE_BUTTON_MIDDLE 2 -#define MOUSE_BUTTON_4 3 -#define MOUSE_BUTTON_5 4 -#define MOUSE_BUTTON_6 5 -#define MOUSE_BUTTON_7 6 -#define MOUSE_BUTTON_8 7 - NS_CC_BEGIN +enum class MouseButton +{ + LEFT = 0, + RIGHT, + MIDDLE, + _4, + _5, + _6, + _7, + _8 +}; + class CC_DLL EventMouse : public Event { public: