atelier.common.controller

Controller

Members

Enums

ControllerAxis
enum ControllerAxis

List of controller axis.

ControllerButton
enum ControllerButton

List of controller buttons.

Functions

addController
void addController(int index)

Attempt to connect a new controller

addControllerMapping
void addControllerMapping(string mapping)

Register a controller definition, must be a valid format.

addControllerMappingsFromFile
void addControllerMappingsFromFile(string filePath)

Register all controller definitions in a file, must be a valid format.

destroyControllers
void destroyControllers()

Close all the connected controllers

getAxis
float getAxis(ControllerAxis axis)

Return the current state of the axis.

getButtonDown
bool getButtonDown(ControllerButton button)

Check whether the button associated with the ID is pressed. \ This function resets the value to false.

initializeControllers
void initializeControllers()

Open all the connected controllers

isButtonDown
bool isButtonDown(ControllerButton button)

Check whether the button associated with the ID is pressed. \ Do not reset the value.

remapController
void remapController(int joystickId)

Called upon remapping

removeController
void removeController(int joystickId)

Remove a connected controller

setControllerAxis
void setControllerAxis(SDL_GameControllerAxis axis, short value)

Change the value of a controller axis.

setControllerButton
void setControllerButton(SDL_GameControllerButton button, bool state)

Change the value of a controller button.

updateControllers
void updateControllers(float deltaTime)

Update the state of the controllers

Meta

License

Zlib

Authors

Enalye