#include <inputcomponent.h>
Public Member Functions | |
PointerInputComponentInstance (EntityInstance &entity, Component &resource) | |
![]() | |
InputComponentInstance (EntityInstance &entity, Component &resource) | |
![]() | |
ComponentInstance (EntityInstance &entity, Component &resource) | |
virtual void | update (double deltaTime) |
nap::EntityInstance * | getEntityInstance () const |
nap::Component * | getComponent () const |
template<typename T > | |
T * | getComponent () const |
virtual bool | init (utility::ErrorState &errorState) |
virtual bool | init (utility::ErrorState &errorState) |
![]() | |
Object () | |
virtual | ~Object () |
virtual void | onDestroy () |
Object (Object &)=delete | |
Object & | operator= (const Object &)=delete |
Object (Object &&)=delete | |
Object & | operator= (Object &&)=delete |
Public Attributes | |
Signal< const PointerPressEvent & > | pressed |
Signal emitted when the input component receives a click. More... | |
Signal< const PointerReleaseEvent & > | released |
Signal emitted when the click is released. More... | |
Signal< const PointerMoveEvent & > | moved |
Signal emitted when this component receives a mouse move. More... | |
![]() | |
std::string | mID |
Property: 'mID' unique name of the object. Used as an identifier by the system. More... | |
Protected Member Functions | |
virtual void | trigger (const nap::InputEvent &inEvent) override |
Additional Inherited Members | |
![]() | |
static bool | isIDProperty (rtti::Instance &object, const rtti::Property &property) |
Input component that receives mouse events Register to the various signals to receive mouse events
PointerInputComponentInstance | ( | EntityInstance & | entity, |
Component & | resource | ||
) |
|
overrideprotectedvirtual |
This function is called by an InputRouter derived class if it decides to route the input to this component. Implement this function in a derived class to handle input.
inEvent | An InputEvent-derived class. Use RTTI queries to test the type of event and to retrieve data from it. |
Implements InputComponentInstance.
Signal<const PointerMoveEvent&> moved |
Signal emitted when this component receives a mouse move.
Signal<const PointerPressEvent&> pressed |
Signal emitted when the input component receives a click.
Signal<const PointerReleaseEvent&> released |
Signal emitted when the click is released.