fix Director: corregit els bindGameControllerButton() per al menú de servei
This commit is contained in:
@@ -161,10 +161,12 @@ void Director::bindInputs()
|
||||
Input::get()->bindKey(InputAction::LEFT, SDL_SCANCODE_LEFT);
|
||||
Input::get()->bindKey(InputAction::RIGHT, SDL_SCANCODE_RIGHT);
|
||||
|
||||
// Teclado - Disparo del jugador
|
||||
Input::get()->bindKey(InputAction::FIRE_LEFT, SDL_SCANCODE_Q);
|
||||
Input::get()->bindKey(InputAction::FIRE_CENTER, SDL_SCANCODE_W);
|
||||
Input::get()->bindKey(InputAction::FIRE_RIGHT, SDL_SCANCODE_E);
|
||||
|
||||
// Teclado - Interfaz
|
||||
Input::get()->bindKey(InputAction::START, SDL_SCANCODE_RETURN);
|
||||
|
||||
// Teclado - Menu de servicio
|
||||
@@ -189,7 +191,6 @@ void Director::bindInputs()
|
||||
Input::get()->bindKey(InputAction::CHANGE_LANG, SDL_SCANCODE_F9);
|
||||
|
||||
Input::get()->bindKey(InputAction::RESET, SDL_SCANCODE_F10);
|
||||
|
||||
Input::get()->bindKey(InputAction::SHOW_INFO, SDL_SCANCODE_F12);
|
||||
|
||||
// Asigna botones a inputs
|
||||
@@ -202,16 +203,14 @@ void Director::bindInputs()
|
||||
Input::get()->bindGameControllerButton(i, InputAction::LEFT, SDL_GAMEPAD_BUTTON_DPAD_LEFT);
|
||||
Input::get()->bindGameControllerButton(i, InputAction::RIGHT, SDL_GAMEPAD_BUTTON_DPAD_RIGHT);
|
||||
|
||||
// Mando - Disparo del jugador
|
||||
Input::get()->bindGameControllerButton(i, InputAction::FIRE_LEFT, SDL_GAMEPAD_BUTTON_WEST);
|
||||
Input::get()->bindGameControllerButton(i, InputAction::FIRE_CENTER, SDL_GAMEPAD_BUTTON_NORTH);
|
||||
Input::get()->bindGameControllerButton(i, InputAction::FIRE_RIGHT, SDL_GAMEPAD_BUTTON_EAST);
|
||||
|
||||
// Mando - Interfaz
|
||||
Input::get()->bindGameControllerButton(i, InputAction::START, SDL_GAMEPAD_BUTTON_START);
|
||||
|
||||
// Teclado - Menu de servicio
|
||||
Input::get()->bindGameControllerButton(i, InputAction::SERVICE, SDL_GAMEPAD_BUTTON_BACK);
|
||||
Input::get()->bindGameControllerButton(i, InputAction::SM_SELECT, SDL_GAMEPAD_BUTTON_WEST);
|
||||
Input::get()->bindGameControllerButton(i, InputAction::SM_BACK, SDL_GAMEPAD_BUTTON_NORTH);
|
||||
}
|
||||
|
||||
// Mapea las asignaciones a los botones desde el archivo de configuración, si se da el caso
|
||||
@@ -233,14 +232,9 @@ void Director::bindInputs()
|
||||
// Asigna botones a inputs desde otros inputs
|
||||
for (int i = 0; i < NUM_GAMEPADS; ++i)
|
||||
{
|
||||
Input::get()->bindGameControllerButton(i, InputAction::EXIT, InputAction::START);
|
||||
Input::get()->bindGameControllerButton(i, InputAction::RESET, InputAction::FIRE_CENTER);
|
||||
Input::get()->bindGameControllerButton(i, InputAction::PAUSE, InputAction::FIRE_RIGHT);
|
||||
Input::get()->bindGameControllerButton(i, InputAction::TOGGLE_VIDEO_SHADERS, InputAction::FIRE_LEFT);
|
||||
Input::get()->bindGameControllerButton(i, InputAction::TOGGLE_AUDIO, InputAction::LEFT);
|
||||
Input::get()->bindGameControllerButton(i, InputAction::SHOW_INFO, InputAction::RIGHT);
|
||||
Input::get()->bindGameControllerButton(i, InputAction::CONFIG, InputAction::DOWN);
|
||||
Input::get()->bindGameControllerButton(i, InputAction::SWAP_CONTROLLERS, InputAction::UP);
|
||||
// Mando - Menu de servicio
|
||||
Input::get()->bindGameControllerButton(i, InputAction::SM_SELECT, InputAction::FIRE_LEFT);
|
||||
Input::get()->bindGameControllerButton(i, InputAction::SM_BACK, InputAction::FIRE_CENTER);
|
||||
}
|
||||
|
||||
// Guarda las asignaciones de botones en las opciones de los dos primeros mandos
|
||||
|
||||
Reference in New Issue
Block a user