Joystick

Give access to the real-time state of the joysticks.

Members

Enums

Axis
enum Axis

Axes supported by SFML joysticks.

JoystickCount
anonymousenum JoystickCount
Undocumented in source.

Static functions

getAxisPosition
float getAxisPosition(uint joystick, Axis axis)

Get the current position of a joystick axis.

getButtonCount
uint getButtonCount(uint joystick)

Return the number of buttons supported by a joystick.

getIdentification
Identification getIdentification(uint joystick)

Get the joystick information

hasAxis
bool hasAxis(uint joystick, Axis axis)

Check if a joystick supports a given axis.

isButtonPressed
bool isButtonPressed(uint joystick, uint button)

Check if a joystick button is pressed.

isConnected
bool isConnected(uint joystick)

Check if a joystick is connected.

update
void update()

Update the states of all joysticks.

Structs

Identification
struct Identification

Structure holding a joystick's identification

Meta