diff --git a/overcooked_simulator/gui_2d_vis/overcooked_gui.py b/overcooked_simulator/gui_2d_vis/overcooked_gui.py index cacc5fe4ebaa8ae99cc653e9a8c5838f4ad416ee..29aded7209133ab8f1fbea861ce619498ed8476f 100644 --- a/overcooked_simulator/gui_2d_vis/overcooked_gui.py +++ b/overcooked_simulator/gui_2d_vis/overcooked_gui.py @@ -364,6 +364,10 @@ class PyGameGUI: current_player_name, ActionType.INTERACT, InterActionData.STOP ) self.send_action(action) + # switch button Y <-> 3 + if event.button == 3 and not CONNECT_WITH_STUDY_SERVER: + if event.type == pygame.JOYBUTTONDOWN: + key_set.next_player() def init_ui_elements(self): self.manager = pygame_gui.UIManager((self.window_width, self.window_height))