InputAction → enum class Input::Action

This commit is contained in:
2026-05-16 19:59:12 +02:00
parent 40e1140734
commit 1e6cb3bb24
12 changed files with 121 additions and 118 deletions
+4 -4
View File
@@ -740,28 +740,28 @@ void Menu::setDefaultActionWhenCancel(int item) {
// Gestiona la entrada de teclado y mando durante el menu
void Menu::checkInput() {
if (Input::get()->checkInput(UP, Input::Repeat::OFF)) {
if (Input::get()->checkInput(Input::Action::UP, Input::Repeat::OFF)) {
decreaseSelectorIndex();
if (sound_move_ != nullptr) {
Audio::get()->playSound(sound_move_);
}
}
if (Input::get()->checkInput(DOWN, Input::Repeat::OFF)) {
if (Input::get()->checkInput(Input::Action::DOWN, Input::Repeat::OFF)) {
increaseSelectorIndex();
if (sound_move_ != nullptr) {
Audio::get()->playSound(sound_move_);
}
}
if (Input::get()->checkInput(ACCEPT, Input::Repeat::OFF)) {
if (Input::get()->checkInput(Input::Action::ACCEPT, Input::Repeat::OFF)) {
item_selected_ = selector_.index;
if (sound_accept_ != nullptr) {
Audio::get()->playSound(sound_accept_);
}
}
if (Input::get()->checkInput(CANCEL, Input::Repeat::OFF)) {
if (Input::get()->checkInput(Input::Action::CANCEL, Input::Repeat::OFF)) {
item_selected_ = default_action_when_cancel_;
if (sound_cancel_ != nullptr) {
Audio::get()->playSound(sound_cancel_);