SFML
Simple and Fast Multimedia Library
Loading...
Searching...
No Matches
Joystick.hpp File Reference
Include dependency graph for Joystick.hpp:
This graph shows which files directly or indirectly include this file:

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

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