migrant input: ja compila, ja no peta... falta descomentar mig codi
This commit is contained in:
@@ -170,8 +170,9 @@ auto checkServiceButton() -> bool {
|
||||
|
||||
// Mandos
|
||||
{
|
||||
for (int i = 0; i < Input::get()->getNumControllers(); ++i) {
|
||||
if (Input::get()->checkAction(Input::Action::SERVICE, Input::DO_NOT_ALLOW_REPEAT, Input::Device::CONTROLLER, i)) {
|
||||
auto gamepads = Input::get()->getGamepads();
|
||||
for (auto gamepad : gamepads) {
|
||||
if (Input::get()->checkAction(Input::Action::SERVICE, Input::DO_NOT_ALLOW_REPEAT, Input::Device::CONTROLLER, gamepad)) {
|
||||
toggleServiceMenu();
|
||||
return true;
|
||||
}
|
||||
@@ -227,39 +228,40 @@ auto checkServiceInputs() -> bool {
|
||||
|
||||
// Mandos
|
||||
{
|
||||
for (int i = 0; i < Input::get()->getNumControllers(); ++i) {
|
||||
auto gamepads = Input::get()->getGamepads();
|
||||
for (auto gamepad : gamepads) {
|
||||
// Arriba
|
||||
if (Input::get()->checkAction(Input::Action::UP, Input::DO_NOT_ALLOW_REPEAT, Input::Device::CONTROLLER, i)) {
|
||||
if (Input::get()->checkAction(Input::Action::UP, Input::DO_NOT_ALLOW_REPEAT, Input::Device::CONTROLLER, gamepad)) {
|
||||
ServiceMenu::get()->setSelectorUp();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Abajo
|
||||
if (Input::get()->checkAction(Input::Action::DOWN, Input::DO_NOT_ALLOW_REPEAT, Input::Device::CONTROLLER, i)) {
|
||||
if (Input::get()->checkAction(Input::Action::DOWN, Input::DO_NOT_ALLOW_REPEAT, Input::Device::CONTROLLER, gamepad)) {
|
||||
ServiceMenu::get()->setSelectorDown();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Derecha
|
||||
if (Input::get()->checkAction(Input::Action::RIGHT, Input::DO_NOT_ALLOW_REPEAT, Input::Device::CONTROLLER, i)) {
|
||||
if (Input::get()->checkAction(Input::Action::RIGHT, Input::DO_NOT_ALLOW_REPEAT, Input::Device::CONTROLLER, gamepad)) {
|
||||
ServiceMenu::get()->adjustOption(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Izquierda
|
||||
if (Input::get()->checkAction(Input::Action::LEFT, Input::DO_NOT_ALLOW_REPEAT, Input::Device::CONTROLLER, i)) {
|
||||
if (Input::get()->checkAction(Input::Action::LEFT, Input::DO_NOT_ALLOW_REPEAT, Input::Device::CONTROLLER, gamepad)) {
|
||||
ServiceMenu::get()->adjustOption(false);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Aceptar
|
||||
if (Input::get()->checkAction(Input::Action::SM_SELECT, Input::DO_NOT_ALLOW_REPEAT, Input::Device::CONTROLLER, i)) {
|
||||
if (Input::get()->checkAction(Input::Action::SM_SELECT, Input::DO_NOT_ALLOW_REPEAT, Input::Device::CONTROLLER, gamepad)) {
|
||||
ServiceMenu::get()->selectOption();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Atras
|
||||
if (Input::get()->checkAction(Input::Action::SM_BACK, Input::DO_NOT_ALLOW_REPEAT, Input::Device::CONTROLLER, i)) {
|
||||
if (Input::get()->checkAction(Input::Action::SM_BACK, Input::DO_NOT_ALLOW_REPEAT, Input::Device::CONTROLLER, gamepad)) {
|
||||
ServiceMenu::get()->moveBack();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user