InputAction → enum class Input::Action
This commit is contained in:
@@ -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_);
|
||||
|
||||
Reference in New Issue
Block a user