Raylib C++  1.0.0
Encapsulates the raylib library
Static Public Member Functions | List of all members
raylib::helper::input::GamepadHelper Class Reference

Helper class for Input-related functions: gamepads. More...

#include <GamepadHelper.hpp>

Collaboration diagram for raylib::helper::input::GamepadHelper:
Collaboration graph

Static Public Member Functions

static bool isGamepadAvailable (const int &gamepad)
 Check if a gamepad is available. More...
 
static std::string getGamepadName (const int &gamepad)
 Get the name of a gamepad. More...
 
static bool isGamepadButtonPressed (const int &gamepad, const GamepadButton &button)
 Check if a gamepad button is pressed (once) More...
 
static bool isGamepadButtonDown (const int &gamepad, const GamepadButton &button)
 Check if a gamepad button is down. More...
 
static bool isGamepadButtonReleased (const int &gamepad, const GamepadButton &button)
 Check if a gamepad button is released (once) More...
 
static bool isGamepadButtonUp (const int &gamepad, const GamepadButton &button)
 Check if a gamepad button is NOT being pressed. More...
 
static int getGamepadButtonPressed ()
 Get the last pressed gamepad button. More...
 
static int getGamepadAxisCount (const int &gamepad)
 Get gamepad axis count for a gamepad. More...
 
static float getGamepadAxisMovement (const int &gamepad, const GamepadAxis &axis)
 Get axis movement value for a gamepad axis. More...
 
static int setGamepadMappings (const std::string &mappings)
 Set internal gamepad mappings (SDL_GameControllerDB) More...
 

Detailed Description

Helper class for Input-related functions: gamepads.

Member Function Documentation

◆ getGamepadAxisCount()

int raylib::helper::input::GamepadHelper::getGamepadAxisCount ( const int &  gamepad)
static

Get gamepad axis count for a gamepad.

Parameters
gamepadthe gamepad to get the axis count from
Returns
the axis count of the gamepad

◆ getGamepadAxisMovement()

float raylib::helper::input::GamepadHelper::getGamepadAxisMovement ( const int &  gamepad,
const GamepadAxis &  axis 
)
static

Get axis movement value for a gamepad axis.

Parameters
gamepadthe gamepad to get the axis movement from
axisthe axis to get the movement from
Returns
the axis movement value

◆ getGamepadButtonPressed()

int raylib::helper::input::GamepadHelper::getGamepadButtonPressed ( )
static

Get the last pressed gamepad button.

Returns
the last pressed gamepad button

◆ getGamepadName()

std::string raylib::helper::input::GamepadHelper::getGamepadName ( const int &  gamepad)
static

Get the name of a gamepad.

Parameters
gamepadthe gamepad to get the name from
Returns
the name of the gamepad

◆ isGamepadAvailable()

bool raylib::helper::input::GamepadHelper::isGamepadAvailable ( const int &  gamepad)
static

Check if a gamepad is available.

Parameters
gamepadthe gamepad to check
Returns
true if the gamepad is available

◆ isGamepadButtonDown()

bool raylib::helper::input::GamepadHelper::isGamepadButtonDown ( const int &  gamepad,
const GamepadButton &  button 
)
static

Check if a gamepad button is down.

Parameters
gamepadthe gamepad to check
buttonthe button to check
Returns
true if the button is down

◆ isGamepadButtonPressed()

bool raylib::helper::input::GamepadHelper::isGamepadButtonPressed ( const int &  gamepad,
const GamepadButton &  button 
)
static

Check if a gamepad button is pressed (once)

Parameters
gamepadthe gamepad to check
buttonthe button to check
Returns
true if the button is pressed

◆ isGamepadButtonReleased()

bool raylib::helper::input::GamepadHelper::isGamepadButtonReleased ( const int &  gamepad,
const GamepadButton &  button 
)
static

Check if a gamepad button is released (once)

Parameters
gamepadthe gamepad to check
buttonthe button to check
Returns
true if the button is released

◆ isGamepadButtonUp()

bool raylib::helper::input::GamepadHelper::isGamepadButtonUp ( const int &  gamepad,
const GamepadButton &  button 
)
static

Check if a gamepad button is NOT being pressed.

Parameters
gamepadthe gamepad to check
buttonthe button to check
Returns
true if the button is NOT being pressed

◆ setGamepadMappings()

int raylib::helper::input::GamepadHelper::setGamepadMappings ( const std::string &  mappings)
static

Set internal gamepad mappings (SDL_GameControllerDB)

Parameters
mappingsthe mappings to set
Returns
the number of mappings set

The documentation for this class was generated from the following files: