From 65120938e19711e15cc04f3914a23aed3a9fe668 Mon Sep 17 00:00:00 2001
From: fheinrich <fheinrich@techfak.uni-bielefeld.de>
Date: Tue, 26 Mar 2024 15:11:46 +0100
Subject: [PATCH] Added config to disable pressing controller or keyboard to
 continue

---
 cooperative_cuisine/pygame_2d_vis/gui.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/cooperative_cuisine/pygame_2d_vis/gui.py b/cooperative_cuisine/pygame_2d_vis/gui.py
index 8d3b49c5..b46340e0 100644
--- a/cooperative_cuisine/pygame_2d_vis/gui.py
+++ b/cooperative_cuisine/pygame_2d_vis/gui.py
@@ -1546,7 +1546,7 @@ class PyGameGUI:
             "translations.level_name", text_kwargs={"level": self.level_info["name"]}
         )
 
-        graph_width = self.window_width * 0.55
+        graph_width = self.window_width * 0.6
         rows = 0
         for rg in self.level_info["recipe_graphs"]:
             rows += len(np.unique(np.array(list(rg["layout"].values()))[:, 1]))
@@ -2128,8 +2128,7 @@ class PyGameGUI:
         if event.type == pygame.JOYDEVICEREMOVED:
             self.remove_joystick(event)
 
-        # Press enter key or controller start button instead of mouse button press
-        if (
+        if self.visualization_config["Gui"]["press_button_to_continue"] and (
             event.type == pygame.JOYBUTTONDOWN
             and any([joy.get_button(7) for joy in self.joysticks.values()])
             or (event.type == pygame.KEYDOWN and event.key == pygame.K_RETURN)
-- 
GitLab