25#ifndef SFML_JOYSTICK_HPP
26#define SFML_JOYSTICK_HPP
31#include <SFML/Window/Export.hpp>
32#include <SFML/System/String.hpp>
Give access to the real-time state of the joysticks.
static bool hasAxis(unsigned int joystick, Axis axis)
Check if a joystick supports a given axis.
Axis
Axes supported by SFML joysticks.
@ PovX
The X axis of the point-of-view hat.
static unsigned int getButtonCount(unsigned int joystick)
Return the number of buttons supported by a joystick.
static Identification getIdentification(unsigned int joystick)
Get the joystick information.
static void update()
Update the states of all joysticks.
static bool isConnected(unsigned int joystick)
Check if a joystick is connected.
static bool isButtonPressed(unsigned int joystick, unsigned int button)
Check if a joystick button is pressed.
static float getAxisPosition(unsigned int joystick, Axis axis)
Get the current position of a joystick axis.
Utility string class that automatically handles conversions between types and encodings.
Structure holding a joystick's identification.
String name
Name of the joystick.
unsigned int productId
Product identifier.
unsigned int vendorId
Manufacturer identifier.