SFML 3.0.2
Loading...
Searching...
No Matches
Classes | Namespaces | Enumerations | Functions | Variables
Joystick.hpp File Reference
`#include <SFML/Window/Export.hpp>`
`#include <SFML/System/String.hpp>`

Go to the source code of this file.

## Classes

struct | sf::Joystick::Identification
| Structure holding a joystick's identification. More...

## Namespaces

namespace | sf
namespace | sf::Joystick
| Give access to the real-time state of the joysticks.

## Enumerations

enum class | sf::Joystick::Axis { sf::Joystick::X , sf::Joystick::Y , sf::Joystick::Z , sf::Joystick::R , sf::Joystick::U , sf::Joystick::V , sf::Joystick::PovX , sf::Joystick::PovY }
| Axes supported by SFML joysticks. More...

## Functions

bool | sf::Joystick::isConnected (unsigned int joystick)
| Check if a joystick is connected.
unsigned int | sf::Joystick::getButtonCount (unsigned int joystick)
| Return the number of buttons supported by a joystick.
bool | sf::Joystick::hasAxis (unsigned int joystick, Axis axis)
| Check if a joystick supports a given axis.
bool | sf::Joystick::isButtonPressed (unsigned int joystick, unsigned int button)
| Check if a joystick button is pressed.
float | sf::Joystick::getAxisPosition (unsigned int joystick, Axis axis)
| Get the current position of a joystick axis.
Identification | sf::Joystick::getIdentification (unsigned int joystick)
| Get the joystick information.
void | sf::Joystick::update ()
| Update the states of all joysticks.

## Variables

static constexpr unsigned int | sf::Joystick::Count {8}
| Constants related to joysticks capabilities.
static constexpr unsigned int | sf::Joystick::ButtonCount {32}
| Maximum number of supported buttons.
static constexpr unsigned int | sf::Joystick::AxisCount {8}
| Maximum number of supported axes.