geode/loader/include/Geode/cocos/robtop/mouse_dispatcher/CCMouseDelegate.h

48 lines
925 B
C
Raw Normal View History

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