rj-action-library-cpp/RJPointable.cpp

73 lines
3.2 KiB
C++

/* RJPointable.cpp */
#include "RJPointable.h"
// Registers fields, signals and methods for Godot
void RJPointable::_bind_methods()
{
// pointingPriority: int
ClassDB::bind_method( D_METHOD( "set_pointingPriority", "pointingPriority" ), &RJPointable::set_pointingPriority );
ClassDB::bind_method( D_METHOD( "get_pointingPriority"), &RJPointable::get_pointingPriority);
ADD_PROPERTY(PropertyInfo( Variant::INT, "pointingPriority" ), "set_pointingPriority", "get_pointingPriority" );
// onPointed: RJAction*
ClassDB::bind_method( D_METHOD( "set_onPointed", "onPointed" ), &RJPointable::set_onPointed );
ClassDB::bind_method( D_METHOD( "get_onPointed"), &RJPointable::get_onPointed);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "onPointed", PROPERTY_HINT_NODE_TYPE ), "set_onPointed", "get_onPointed" );
// onUnpointed: RJAction*
ClassDB::bind_method( D_METHOD( "set_onUnpointed", "onUnpointed" ), &RJPointable::set_onUnpointed );
ClassDB::bind_method( D_METHOD( "get_onUnpointed"), &RJPointable::get_onUnpointed);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "onUnpointed", PROPERTY_HINT_NODE_TYPE ), "set_onUnpointed", "get_onUnpointed" );
// onPointerAdded: RJAction*
ClassDB::bind_method( D_METHOD( "set_onPointerAdded", "onPointerAdded" ), &RJPointable::set_onPointerAdded );
ClassDB::bind_method( D_METHOD( "get_onPointerAdded"), &RJPointable::get_onPointerAdded);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "onPointerAdded", PROPERTY_HINT_NODE_TYPE ), "set_onPointerAdded", "get_onPointerAdded" );
// onPointerRemoved: RJAction*
ClassDB::bind_method( D_METHOD( "set_onPointerRemoved", "onPointerRemoved" ), &RJPointable::set_onPointerRemoved );
ClassDB::bind_method( D_METHOD( "get_onPointerRemoved"), &RJPointable::get_onPointerRemoved);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "onPointerRemoved", PROPERTY_HINT_NODE_TYPE ), "set_onPointerRemoved", "get_onPointerRemoved" );
GDVIRTUAL_BIND( updatePointerState, "pointer", "pointed" );
GDVIRTUAL_BIND( getPointer, "index" );
GDVIRTUAL_BIND( numPointing );
}
// Constructor
RJPointable::RJPointable()
{
pointingPriority = 0;
}
// Destructor
RJPointable::~RJPointable()
{
}
// pointingPriority: int
int RJPointable::get_pointingPriority() { return pointingPriority; }
void RJPointable::set_pointingPriority( int p_pointingPriority ) { pointingPriority = p_pointingPriority; }
// onPointed: RJAction*
RJAction* RJPointable::get_onPointed() const { return onPointed; }
void RJPointable::set_onPointed( RJAction* p_onPointed ) { onPointed = p_onPointed; }
// onUnpointed: RJAction*
RJAction* RJPointable::get_onUnpointed() const { return onUnpointed; }
void RJPointable::set_onUnpointed( RJAction* p_onUnpointed ) { onUnpointed = p_onUnpointed; }
// onPointerAdded: RJAction*
RJAction* RJPointable::get_onPointerAdded() const { return onPointerAdded; }
void RJPointable::set_onPointerAdded( RJAction* p_onPointerAdded ) { onPointerAdded = p_onPointerAdded; }
// onPointerRemoved: RJAction*
RJAction* RJPointable::get_onPointerRemoved() const { return onPointerRemoved; }
void RJPointable::set_onPointerRemoved( RJAction* p_onPointerRemoved ) { onPointerRemoved = p_onPointerRemoved; }