input: Añadido clearBindings()
This commit is contained in:
@@ -351,3 +351,18 @@ void Input::setDefaultBindings()
|
||||
bindGameControllerButton(INPUT_PAUSE, SDL_CONTROLLER_BUTTON_START);
|
||||
bindGameControllerButton(INPUT_EXIT, SDL_CONTROLLER_BUTTON_BACK);
|
||||
}
|
||||
|
||||
// Elimina todas las asociaciones de teclado y mando al objeto
|
||||
void Input::clearBindings()
|
||||
{
|
||||
// Inicializa las variables
|
||||
keyBindings_t kb;
|
||||
kb.scancode = 0;
|
||||
kb.active = false;
|
||||
keyBindings.resize(INPUT_TOTAL, kb);
|
||||
|
||||
GameControllerBindings_t gcb;
|
||||
gcb.button = SDL_CONTROLLER_BUTTON_INVALID;
|
||||
gcb.active = false;
|
||||
gameControllerBindings.resize(INPUT_TOTAL, gcb);
|
||||
}
|
||||
@@ -129,6 +129,9 @@ public:
|
||||
|
||||
// Establece unas teclas y botones del mando por defectp
|
||||
void setDefaultBindings();
|
||||
|
||||
// Elimina todas las asociaciones de teclado y mando al objeto
|
||||
void clearBindings();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user