76 lines
1.7 KiB
C++
76 lines
1.7 KiB
C++
|
|
/* RJPointable.h */
|
|
|
|
#ifndef ROKOJORI__POINTABLE_H
|
|
#define ROKOJORI__POINTABLE_H
|
|
|
|
#include "./RJGodotHeaders.h"
|
|
#include "./RJAction.h"
|
|
#include "./RJPointer.h"
|
|
#include "scene/3d/node_3d.h"
|
|
|
|
template<typename Type> class Ref;
|
|
class RJPointer;
|
|
|
|
|
|
class RJPointable : public Node3D
|
|
{
|
|
GDCLASS( RJPointable, Node3D );
|
|
|
|
protected:
|
|
static void _bind_methods();
|
|
|
|
|
|
|
|
// pointingPriority : int
|
|
int pointingPriority;
|
|
|
|
// onPointed : RJAction*
|
|
RJAction* onPointed = nullptr;
|
|
|
|
// onUnpointed : RJAction*
|
|
RJAction* onUnpointed = nullptr;
|
|
|
|
// onPointerAdded : RJAction*
|
|
RJAction* onPointerAdded = nullptr;
|
|
|
|
// onPointerRemoved : RJAction*
|
|
RJAction* onPointerRemoved = nullptr;
|
|
|
|
public:
|
|
|
|
|
|
// pointingPriority : int
|
|
int get_pointingPriority(); void set_pointingPriority( int p_pointingPriority );
|
|
|
|
// onPointed : RJAction*
|
|
RJAction* get_onPointed() const; void set_onPointed( RJAction* p_onPointed );
|
|
|
|
// onUnpointed : RJAction*
|
|
RJAction* get_onUnpointed() const; void set_onUnpointed( RJAction* p_onUnpointed );
|
|
|
|
// onPointerAdded : RJAction*
|
|
RJAction* get_onPointerAdded() const; void set_onPointerAdded( RJAction* p_onPointerAdded );
|
|
|
|
// onPointerRemoved : RJAction*
|
|
RJAction* get_onPointerRemoved() const; void set_onPointerRemoved( RJAction* p_onPointerRemoved );
|
|
|
|
// updatePointerState( Ref<RJPointer> pointer, bool pointed ) : void
|
|
GDVIRTUAL2( updatePointerState, Ref<RJPointer>, bool );
|
|
|
|
// getPointer( int index ) : Ref<RJPointer>
|
|
GDVIRTUAL1R( Ref<RJPointer>, getPointer, int );
|
|
|
|
// numPointing() : int
|
|
GDVIRTUAL0R( int, numPointing );
|
|
|
|
// Constructor
|
|
RJPointable();
|
|
|
|
// Destructor
|
|
~RJPointable();
|
|
};
|
|
|
|
|
|
#endif // ROKOJORI__POINTABLE_H
|