From 60fc8de0360e9a5011246d9f1efc182a7200946d Mon Sep 17 00:00:00 2001 From: kompjoefriek Date: Thu, 22 Jan 2015 20:19:28 +0100 Subject: [PATCH 1/2] Fixes cocos2d/cocos2d-x/#8414 Changes as suggested by @dumganhar --- cocos/base/CCEventMouse.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) 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: From dd694e39d2bf76fd79507727f892ad61e4de3d81 Mon Sep 17 00:00:00 2001 From: kompjoefriek Date: Mon, 26 Jan 2015 23:13:28 +0100 Subject: [PATCH 2/2] Revert "Fixes cocos2d/cocos2d-x/#8414" This reverts commit 60fc8de0360e9a5011246d9f1efc182a7200946d. --- cocos/base/CCEventMouse.h | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/cocos/base/CCEventMouse.h b/cocos/base/CCEventMouse.h index 926b60a6a0..1c5af7eb22 100644 --- a/cocos/base/CCEventMouse.h +++ b/cocos/base/CCEventMouse.h @@ -29,19 +29,16 @@ #include "base/CCEvent.h" #include "math/CCGeometry.h" -NS_CC_BEGIN +#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 -enum class MouseButton -{ - LEFT = 0, - RIGHT, - MIDDLE, - _4, - _5, - _6, - _7, - _8 -}; +NS_CC_BEGIN class CC_DLL EventMouse : public Event {