NDEVR
API Documentation
ControllerInterface::ControlStick

Represents an analog stick input on a controller. More...

Inheritance diagram for ControllerInterface::ControlStick:
[legend]
Collaboration diagram for ControllerInterface::ControlStick:
[legend]

Public Member Functions

 ControlStick (const UUID &id)
 Constructs a ControlStick with the given identifier.
 ControlStick (const UUID &id, Vector< 2, fltp08 > &position)
 Constructs a ControlStick with the given identifier and position.
Public Member Functions inherited from ControllerInterface::ControllerInput
 ControllerInput (UUID id)
 Constructs a ControllerInput with the given unique identifier.

Public Attributes

Vector< 2, fltp08position
 Current 2D position of the analog stick.
bool pressed = false
 Whether the stick is pressed down (clicked).
Public Attributes inherited from ControllerInterface::ControllerInput
String icon
 Icon resource name for this input.
Bounds< 2, fltp08icon_bounds_location = Constant<Bounds<2, fltp08>>::Invalid
 Position and size of the icon on a controller diagram.
UUID id
 Unique identifier for this input.
TranslatedString name
 Display name of this input.

Detailed Description

Represents an analog stick input on a controller.

Definition at line 42 of file ControllerInterface.h.

Constructor & Destructor Documentation

◆ ControlStick() [1/2]

ControllerInterface::ControlStick::ControlStick ( const UUID & id)
inline

Constructs a ControlStick with the given identifier.

Parameters
[in]idThe unique identifier for this stick.

Definition at line 48 of file ControllerInterface.h.

References ControllerInterface::ControllerInput::ControllerInput(), and ControllerInterface::ControllerInput::id.

◆ ControlStick() [2/2]

ControllerInterface::ControlStick::ControlStick ( const UUID & id,
Vector< 2, fltp08 > & position )
inline

Constructs a ControlStick with the given identifier and position.

Parameters
[in]idThe unique identifier for this stick.
[in]positionThe current 2D position of the stick.

Definition at line 56 of file ControllerInterface.h.

References ControllerInterface::ControllerInput::ControllerInput(), ControllerInterface::ControllerInput::id, and position.


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