REPEAT_TRUE/FALSE → enum class Input::Repeat

This commit is contained in:
2026-05-16 19:51:24 +02:00
parent 479d9d941a
commit d72630523a
9 changed files with 42 additions and 41 deletions
+5 -5
View File
@@ -6,7 +6,7 @@
#include "core/audio/audio.hpp" // for Audio::get (playSound)
#include "core/audio/jail_audio.hpp" // for Ja::loadSound, Ja::deleteSound (propietat local)
#include "core/input/input.h" // for Input, REPEAT_FALSE, InputAction
#include "core/input/input.h" // for Input, Input::Repeat::OFF, InputAction
#include "core/rendering/text.h" // for Text
#include "core/resources/asset.h" // for Asset
#include "core/resources/resource_helper.h"
@@ -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, REPEAT_FALSE)) {
if (Input::get()->checkInput(UP, Input::Repeat::OFF)) {
decreaseSelectorIndex();
if (sound_move_ != nullptr) {
Audio::get()->playSound(sound_move_);
}
}
if (Input::get()->checkInput(DOWN, REPEAT_FALSE)) {
if (Input::get()->checkInput(DOWN, Input::Repeat::OFF)) {
increaseSelectorIndex();
if (sound_move_ != nullptr) {
Audio::get()->playSound(sound_move_);
}
}
if (Input::get()->checkInput(ACCEPT, REPEAT_FALSE)) {
if (Input::get()->checkInput(ACCEPT, Input::Repeat::OFF)) {
item_selected_ = selector_.index;
if (sound_accept_ != nullptr) {
Audio::get()->playSound(sound_accept_);
}
}
if (Input::get()->checkInput(CANCEL, REPEAT_FALSE)) {
if (Input::get()->checkInput(CANCEL, Input::Repeat::OFF)) {
item_selected_ = default_action_when_cancel_;
if (sound_cancel_ != nullptr) {
Audio::get()->playSound(sound_cancel_);