diff --git a/overcooked_simulator/gui_2d_vis/gui_theme.json b/overcooked_simulator/gui_2d_vis/gui_theme.json index 4683e4e3ec100dd15772c1a1ff2bc58f75260e08..862d3d963c63ae0abe29c2c37516be2bc750b1cf 100644 --- a/overcooked_simulator/gui_2d_vis/gui_theme.json +++ b/overcooked_simulator/gui_2d_vis/gui_theme.json @@ -56,7 +56,7 @@ }, "font": { "size": 20, - "bold": 1 + "bold": 0 } }, "#score_label": { @@ -68,6 +68,15 @@ "bold": 1 } }, + "#orders_label": { + "colours": { + "normal_text": "#000000" + }, + "font": { + "size": 20, + "bold": 0 + } + }, "#quit_button": { "colours": { "normal_bg": "#f71b29", diff --git a/overcooked_simulator/gui_2d_vis/overcooked_gui.py b/overcooked_simulator/gui_2d_vis/overcooked_gui.py index b458164e2f2341f171b9e1e047fe4be2d7549c4d..d7375be76f643e63e7507dda99abb8002678beb5 100644 --- a/overcooked_simulator/gui_2d_vis/overcooked_gui.py +++ b/overcooked_simulator/gui_2d_vis/overcooked_gui.py @@ -550,7 +550,7 @@ class PyGameGUI: def draw_orders(self, state): orders = [ - "Tomato", + "Burger", "TomatoSoupPlate", "OnionSoupPlate", "OnionSoupPlate", @@ -564,9 +564,8 @@ class PyGameGUI: (orders_width, orders_height), ) - pygame.draw.rect( - self.orders_screen, colors["green"], self.orders_screen.get_rect() - ) + bg_color = colors[self.visualization_config["GameWindow"]["background_color"]] + pygame.draw.rect(self.orders_screen, bg_color, self.orders_screen.get_rect()) order_rects_start = (orders_height // 2) - (self.grid_size // 2) @@ -607,6 +606,13 @@ class PyGameGUI: ] self.main_window.blit(self.orders_screen, orders_rect) + self.orders_label = pygame_gui.elements.UILabel( + text="Orders:", + relative_rect=pygame.Rect(0, 0, self.screen_margin, self.screen_margin), + manager=self.manager, + object_id="#orders_label", + ) + def draw(self, state): """Main visualization function. @@ -871,7 +877,9 @@ class PyGameGUI: state = self.simulator.get_state() - self.main_window.fill(colors["lemonchiffon1"]) + self.main_window.fill( + colors[self.visualization_config["GameWindow"]["background_color"]] + ) self.manager.draw_ui(self.main_window) match self.menu_state: diff --git a/overcooked_simulator/gui_2d_vis/visualization.yaml b/overcooked_simulator/gui_2d_vis/visualization.yaml index 626bda9a18814752040709aeef3b34c1a784a2b8..bef233b6af08f9d8be8ad301dcd47f74b01f208f 100644 --- a/overcooked_simulator/gui_2d_vis/visualization.yaml +++ b/overcooked_simulator/gui_2d_vis/visualization.yaml @@ -12,6 +12,8 @@ GameWindow: order_bar_height: 100 order_size: 50 + background_color: lemonchiffon1 + Kitchen: ground_tiles_color: sgigray76 background_lines: gray79