geode/loader/include/Geode/cocos/robtop/mouse_dispatcher/CCMouseDispatcher.h
2024-06-20 15:19:43 +03:00

38 lines
729 B
C++
Vendored

#ifndef __CCMOUSE_DISPATCHER_H__
#define __CCMOUSE_DISPATCHER_H__
#include "CCMouseDelegate.h"
#include "../../cocoa/CCArray.h"
NS_CC_BEGIN
// @note RobTop Addition
class CC_DLL CCMouseDispatcher : public CCObject
{
GEODE_FRIEND_MODIFY
public:
CCMouseDispatcher();
virtual ~CCMouseDispatcher();
void addDelegate(CCMouseDelegate* pDelegate);
void removeDelegate(CCMouseDelegate* pDelegate);
void forceAddDelegate(CCMouseDelegate* pDelegate);
void forceRemoveDelegate(CCMouseDelegate* pDelegate);
bool dispatchScrollMSG(float x, float y);
protected:
CCArray* m_pMouseHandlers;
bool m_bLocked;
bool m_bToAdd;
bool m_bToRemove;
ccCArray* m_pHandlersToAdd;
ccCArray* m_pHandlersToRemove;
};
NS_CC_END
#endif