Prevent annoying situation in which you flip-flop between menus

This commit is contained in:
Lorenzooone
2024-06-11 16:04:26 +02:00
parent bd0a14a12f
commit 12d81c5b47
4 changed files with 94 additions and 27 deletions

View File

@@ -356,15 +356,15 @@ bool RelativePositionMenu::poll(SFEvent &event_data) {
break;
case sf::Event::JoystickButtonPressed:
switch(get_joystick_action(event_data.joystickId, event_data.joy_button)) {
case JOY_ACTION_CONFIRM:
this->option_selection_handling();
break;
case JOY_ACTION_NEGATE:
this->option_selection_handling();
break;
default:
consumed = false;
break;
case JOY_ACTION_CONFIRM:
this->option_selection_handling();
break;
case JOY_ACTION_NEGATE:
this->option_selection_handling();
break;
default:
consumed = false;
break;
}
break;
case sf::Event::JoystickMoved: