45static constexpr unsigned int Count{8};
46static constexpr unsigned int ButtonCount{32};
47static constexpr unsigned int AxisCount{8};
#define SFML_WINDOW_API
Definition Export.hpp:42
Utility string class that automatically handles conversions between types and encodings.
Definition String.hpp:89
Give access to the real-time state of the joysticks.
Definition Joystick.hpp:39
SFML_WINDOW_API bool isButtonPressed(unsigned int joystick, unsigned int button)
Check if a joystick button is pressed.
SFML_WINDOW_API void update()
Update the states of all joysticks.
SFML_WINDOW_API bool isConnected(unsigned int joystick)
Check if a joystick is connected.
Axis
Axes supported by SFML joysticks.
Definition Joystick.hpp:55
@ X
The X axis.
Definition Joystick.hpp:56
@ Z
The Z axis.
Definition Joystick.hpp:58
@ U
The U axis.
Definition Joystick.hpp:60
@ V
The V axis.
Definition Joystick.hpp:61
@ Y
The Y axis.
Definition Joystick.hpp:57
@ PovX
The X axis of the point-of-view hat.
Definition Joystick.hpp:62
@ PovY
The Y axis of the point-of-view hat.
Definition Joystick.hpp:63
@ R
The R axis.
Definition Joystick.hpp:59
SFML_WINDOW_API bool hasAxis(unsigned int joystick, Axis axis)
Check if a joystick supports a given axis.
SFML_WINDOW_API unsigned int getButtonCount(unsigned int joystick)
Return the number of buttons supported by a joystick.
SFML_WINDOW_API float getAxisPosition(unsigned int joystick, Axis axis)
Get the current position of a joystick axis.
SFML_WINDOW_API Identification getIdentification(unsigned int joystick)
Get the joystick information.
Structure holding a joystick's identification.
Definition Joystick.hpp:71
String name
Name of the joystick.
Definition Joystick.hpp:72
unsigned int productId
Product identifier.
Definition Joystick.hpp:74
unsigned int vendorId
Manufacturer identifier.
Definition Joystick.hpp:73