1#ifndef __CONTROLLERSETUP_HPP_
2#define __CONTROLLERSETUP_HPP_
28 void BindButton(
int button, std::function<
void(
int,
bool)> func) {
38 void BindAxis(
int axis, std::function<
void(
int,
int)> func) {
Definition: controllerSetup.hpp:10
void CallAxisCallback(int axis, int value)
Calls the callback assiociated with the axis index.
Definition: controllerSetup.hpp:59
std::array< std::function< void(int, bool)>, 11 > buttonsCallback
Definition: controllerSetup.hpp:12
void BindAxis(int axis, std::function< void(int, int)> func)
Binds the axis index with the callback function.
Definition: controllerSetup.hpp:38
std::array< std::function< void(int, int)>, 8 > axisCallback
Definition: controllerSetup.hpp:13
Binder()
Definition: controllerSetup.hpp:16
void BindButton(int button, std::function< void(int, bool)> func)
Binds the button index with the callback function.
Definition: controllerSetup.hpp:28
void CallButtonCallback(int button, bool state)
Calls the callback assiociated with the button index.
Definition: controllerSetup.hpp:49
Definition: controllerSetup.hpp:66
void run(bool debug)
Runs the controller with the bound callbacks.
Definition: controllerSetup.cpp:25
Joystick joystick
Definition: controllerSetup.hpp:68
ControllerSetup()=delete
Cannot create empty controller.
Binder binder
Definition: controllerSetup.hpp:69
Represents a joystick device.
Definition: joystick.hpp:101