Unlike raylib's GamepadButton (normalized Xbox-style layout), sf::Joystick exposes raw numbered buttons/axes with no guaranteed meaning across controllers/platforms. This uses the common Xbox- style button ordering (0=A,1=B,2=X,3=Y) most drivers report, but it isn't guaranteed the way raylib's mapping is.
More...
#include <SfmlGamepad.hpp>
Unlike raylib's GamepadButton (normalized Xbox-style layout), sf::Joystick exposes raw numbered buttons/axes with no guaranteed meaning across controllers/platforms. This uses the common Xbox- style button ordering (0=A,1=B,2=X,3=Y) most drivers report, but it isn't guaranteed the way raylib's mapping is.
Axes are reported as a percentage in [-100, 100] : divided by 100 to yield the contract's [-1, 1], with no dead zone - a dead zone is a gameplay choice and belongs to the game.
◆ SfmlGamepad()
| SfmlGamepad::SfmlGamepad |
( |
const SfmlWindow & |
window, |
|
|
unsigned int |
index = 0 |
|
) |
| |
|
inline |
◆ ~SfmlGamepad()
| SfmlGamepad::~SfmlGamepad |
( |
| ) |
|
|
overridedefault |
◆ getAxisMovement()
| float SfmlGamepad::getAxisMovement |
( |
Axis |
axis | ) |
const |
|
inlineoverride |
◆ isAvailable()
| bool SfmlGamepad::isAvailable |
( |
| ) |
const |
|
inlineoverride |
The documentation for this class was generated from the following files: