From 2f02690394e5e9caf191942a7326a5f4c38a5bc2 Mon Sep 17 00:00:00 2001 From: Seivan Heidari Date: Tue, 1 Sep 2015 19:38:45 +0200 Subject: [PATCH] EventListenerMouse will dispatch EventMouse events --- cocos/base/CCEventListenerMouse.cpp | 8 ++++---- cocos/base/CCEventListenerMouse.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cocos/base/CCEventListenerMouse.cpp b/cocos/base/CCEventListenerMouse.cpp index de25349faf..c0b139907a 100644 --- a/cocos/base/CCEventListenerMouse.cpp +++ b/cocos/base/CCEventListenerMouse.cpp @@ -82,19 +82,19 @@ bool EventListenerMouse::init() { case EventMouse::MouseEventType::MOUSE_DOWN: if(onMouseDown != nullptr) - onMouseDown(event); + onMouseDown(mouseEvent); break; case EventMouse::MouseEventType::MOUSE_UP: if(onMouseUp != nullptr) - onMouseUp(event); + onMouseUp(mouseEvent); break; case EventMouse::MouseEventType::MOUSE_MOVE: if(onMouseMove != nullptr) - onMouseMove(event); + onMouseMove(mouseEvent); break; case EventMouse::MouseEventType::MOUSE_SCROLL: if(onMouseScroll != nullptr) - onMouseScroll(event); + onMouseScroll(mouseEvent); break; default: break; diff --git a/cocos/base/CCEventListenerMouse.h b/cocos/base/CCEventListenerMouse.h index 49a185d719..90985804f9 100644 --- a/cocos/base/CCEventListenerMouse.h +++ b/cocos/base/CCEventListenerMouse.h @@ -57,10 +57,10 @@ public: virtual EventListenerMouse* clone() override; virtual bool checkAvailable() override; - std::function onMouseDown; - std::function onMouseUp; - std::function onMouseMove; - std::function onMouseScroll; + std::function onMouseDown; + std::function onMouseUp; + std::function onMouseMove; + std::function onMouseScroll; CC_CONSTRUCTOR_ACCESS: EventListenerMouse();