2022-07-30 12:24:03 -04:00
|
|
|
#ifndef __CCMOUSE_DELEGATE_H__
|
|
|
|
#define __CCMOUSE_DELEGATE_H__
|
|
|
|
|
2022-10-17 08:46:36 -04:00
|
|
|
#include "../../include/ccMacros.h"
|
|
|
|
#include "../../cocoa/CCObject.h"
|
2022-07-30 12:24:03 -04:00
|
|
|
|
|
|
|
RT_ADD(
|
|
|
|
NS_CC_BEGIN
|
|
|
|
|
|
|
|
class CC_DLL CCMouseDelegate
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void rightKeyDown() {}
|
|
|
|
|
|
|
|
virtual void rightKeyUp() {}
|
|
|
|
|
|
|
|
virtual void scrollWheel(float x, float y) {}
|
|
|
|
|
|
|
|
//pretty certain there's no fields, based on initializer
|
|
|
|
};
|
|
|
|
|
|
|
|
class CC_DLL CCMouseHandler : public CCObject
|
|
|
|
{
|
|
|
|
public:
|
2023-03-06 13:17:08 -05:00
|
|
|
GEODE_CUSTOM_CONSTRUCTOR_COCOS(CCMouseHandler, CCObject)
|
2022-07-30 12:24:03 -04:00
|
|
|
inline CCMouseHandler() = default;
|
|
|
|
|
|
|
|
virtual ~CCMouseHandler();
|
|
|
|
|
|
|
|
CCMouseHandler& operator=(const CCMouseHandler&);
|
|
|
|
|
|
|
|
CCMouseDelegate* getDelegate();
|
|
|
|
|
|
|
|
static CCMouseHandler* handlerWithDelegate(CCMouseDelegate* pDelegate);
|
|
|
|
|
|
|
|
virtual bool initWithDelegate(CCMouseDelegate* pDelegate);
|
|
|
|
|
|
|
|
void setDelegate(CCMouseDelegate* pDelegate);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
CCMouseDelegate* m_pDelegate;
|
|
|
|
};
|
|
|
|
|
|
|
|
NS_CC_END
|
|
|
|
)
|
|
|
|
|
|
|
|
#endif
|