Gainput  v1.0.0
Public Member Functions | List of all members
gainput::MappedInputListener Class Reference

Listener interface that allows to receive notifications when user button states change. More...

#include <GainputInputListener.h>

Public Member Functions

virtual bool OnUserButtonBool (UserButtonId userButton, bool oldValue, bool newValue)
 Called when a bool-type button state changes. More...
 
virtual bool OnUserButtonFloat (UserButtonId userButton, float oldValue, float newValue)
 Called when a float-type button state changes. More...
 
virtual int GetPriority () const
 Returns the priority which influences the order in which listeners are called by InputMap. More...
 

Detailed Description

Listener interface that allows to receive notifications when user button states change.

Examples:
/samples/listener/listenersample.cpp.

Member Function Documentation

◆ GetPriority()

virtual int gainput::MappedInputListener::GetPriority ( ) const
inlinevirtual

Returns the priority which influences the order in which listeners are called by InputMap.

See also
InputMap::ReorderListeners()

◆ OnUserButtonBool()

virtual bool gainput::MappedInputListener::OnUserButtonBool ( UserButtonId  userButton,
bool  oldValue,
bool  newValue 
)
inlinevirtual

Called when a bool-type button state changes.

Parameters
userButtonThe user button's ID.
oldValuePrevious state of the button.
newValueNew state of the button.
Returns
true if the button may be processed by listeners with a lower priority, false otherwise.

◆ OnUserButtonFloat()

virtual bool gainput::MappedInputListener::OnUserButtonFloat ( UserButtonId  userButton,
float  oldValue,
float  newValue 
)
inlinevirtual

Called when a float-type button state changes.

Parameters
userButtonThe user button's ID.
oldValuePrevious state of the button.
newValueNew state of the button.
Returns
true if the button may be processed by listeners with a lower priority, false otherwise.

The documentation for this class was generated from the following file: