nomlib
Loading...
Searching...
No Matches
nom::GameControllerButtonAction Struct Reference

Create a game controller button action. More...

#include <InputAction.hpp>

Inheritance diagram for nom::GameControllerButtonAction:
[legend]

Public Member Functions

 GameControllerButtonAction (JoystickID id, GameController::Button button, InputState state=InputState::PRESSED)
 Constructor for initializing an object to a valid action state.
Public Member Functions inherited from nom::InputAction
 InputAction ()
 Default constructor; constructs an invalid action state.
virtual const Eventevent (void) const
 Get the underlying event associated with the input action.
const nom::event_callback & callback (void) const
 Get the callback assigned to the input action.
void set_callback (const nom::event_callback &delegate)
void operator() (const Event &evt) const
 C++ functor; execute the callback assigned for the input action.

Additional Inherited Members

Public Attributes inherited from nom::InputAction
Event event_
 The event type and relevant input data; the criteria is used to match against user input.

Detailed Description

Create a game controller button action.

Definition at line 200 of file InputAction.hpp.

Constructor & Destructor Documentation

◆ GameControllerButtonAction()

nom::GameControllerButtonAction::GameControllerButtonAction ( JoystickID id,
GameController::Button button,
InputState state = InputState::PRESSED )

Constructor for initializing an object to a valid action state.

Parameters
idThe unique instance ID given to the joystick by the underlying platform.
buttonOne of the nom::GameController::Button enumeration values.
stateOne of the nom::InputState enumeration values.
See also
GameController::device_id

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