List of all members | Public Member Functions | Public Attributes
thor::JoystickAxis Struct Reference

Contains information about a joystick number, an axis and its threshold. More...

Public Member Functions

 JoystickAxis (unsigned int joystickId, sf::Joystick::Axis axis, float threshold, bool above)
 Constructor. More...
 

Public Attributes

unsigned int joystickId
 The joystick number.
 
sf::Joystick::Axis axis
 The joystick axis.
 
float threshold
 Position threshold above/below which an action is triggered.
 
bool above
 True if position must be above threshold, false if below.
 

Detailed Description

Contains information about a joystick number, an axis and its threshold.

Constructor & Destructor Documentation

thor::JoystickAxis::JoystickAxis ( unsigned int  joystickId,
sf::Joystick::Axis  axis,
float  threshold,
bool  above 
)

Constructor.

Note that you can also construct a joystick id and axis property with the following more expressive syntax:

thor::JoystickAxis j1 = thor::joystick(id).axis(a).above(pos);
thor::JoystickAxis j2 = thor::joystick(id).axis(a).below(pos);

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