Bubba-3D
0.9.0
Awesome game engine!
|
Public Member Functions | |
void | addBinding (int function, Input *button) |
Adds a button to specified function. More... | |
void | addBindings (int function, std::initializer_list< Input * > buttons) |
void | clearBindings () |
ControlStatus | getStatus (int function) |
Static Public Member Functions | |
static ControlsManager * | getInstance () |
Gets the singleton instance of the controls manager. | |
Definition at line 60 of file ControlsManager.h.
void ControlsManager::addBinding | ( | int | function, |
Input * | button | ||
) |
Adds a button to specified function.
Definition at line 47 of file ControlsManager.cpp.
void ControlsManager::addBindings | ( | int | function, |
std::initializer_list< Input * > | buttons | ||
) |
Add several buttons to a function at once. This can also be used to rebind buttons. If a function already has a keyboard button and you add a new keyboard button, then the old one is removed. Any function can only have all dual buttons or all non-dual buttons. If a function is given buttons with different duality an exception is thrown with an error message.
std::string | If a function is given buttons of different dualities. |
Definition at line 51 of file ControlsManager.cpp.
void ControlsManager::clearBindings | ( | ) |
Clears all function bindings. This should only be used when the state of the game has changed and the controls are completely different. If you want to rebind a function use addBindings()
Definition at line 43 of file ControlsManager.cpp.
ControlStatus ControlsManager::getStatus | ( | int | function | ) |
Gets the status for the specified function. To see more on how to use the ControlStatus see the class documentation for ControlStatus.
Definition at line 96 of file ControlsManager.cpp.