Añadida opción para intercambiar los jugadores de los dos primeros mandos
This commit is contained in:
@@ -69,7 +69,7 @@ void DefineButtons::render()
|
||||
{
|
||||
if (enabled)
|
||||
{
|
||||
text->writeCentered(x, y - 10, "JUGADOR " + std::to_string(indexController + 1));
|
||||
text->writeCentered(x, y - 10, "JUGADOR " + std::to_string(options->controller[indexController].playerId));
|
||||
text->writeCentered(x, y, controllerNames[indexController]);
|
||||
text->writeCentered(x, y + 10, buttons[indexButton].label);
|
||||
}
|
||||
@@ -117,7 +117,9 @@ void DefineButtons::checkInput()
|
||||
}
|
||||
|
||||
if (event.type == SDL_CONTROLLERBUTTONDOWN)
|
||||
{
|
||||
doControllerButtonDown(&event.cbutton);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -171,4 +173,12 @@ void DefineButtons::saveBindingsToOptions()
|
||||
{
|
||||
options->controller[indexController].buttons[j] = input->getControllerBinding(indexController, options->controller[indexController].inputs[j]);
|
||||
}
|
||||
}
|
||||
|
||||
// Intercambia los jugadores asignados a los dos primeros mandos
|
||||
void DefineButtons::swapControllers()
|
||||
{
|
||||
const int temp = options->controller[0].playerId;
|
||||
options->controller[0].playerId = options->controller[1].playerId;
|
||||
options->controller[1].playerId = temp;
|
||||
}
|
||||
Reference in New Issue
Block a user