Skip to content
Snippets Groups Projects
Commit 6fb6e6e5 authored by Fabian Heinrich's avatar Fabian Heinrich
Browse files

Fix merge, testing to be done...

parent b44439e2
No related branches found
No related tags found
1 merge request!62Resolve "Game Flow"
Pipeline #46911 passed
...@@ -40,7 +40,6 @@ def start_pygame_gui(cli_args): ...@@ -40,7 +40,6 @@ def start_pygame_gui(cli_args):
def main(cli_args=None): def main(cli_args=None):
study_server = None study_server = None
study_server_args = None study_server_args = None
if USE_STUDY_SERVER: if USE_STUDY_SERVER:
...@@ -93,9 +92,16 @@ def main(cli_args=None): ...@@ -93,9 +92,16 @@ def main(cli_args=None):
print("Start PyGame GUI:") print("Start PyGame GUI:")
pygame_gui_3 = Process(target=start_pygame_gui, args=(cli_args,)) pygame_gui_3 = Process(target=start_pygame_gui, args=(cli_args,))
pygame_gui_3.start() pygame_gui_3.start()
while (
while pygame_gui.is_alive(): pygame_gui.is_alive()
time.sleep(1) and pygame_gui_2.is_alive()
and pygame_gui_3.is_alive()
):
time.sleep(1)
else:
while pygame_gui.is_alive():
time.sleep(1)
except KeyboardInterrupt: except KeyboardInterrupt:
print("Received Keyboard interrupt") print("Received Keyboard interrupt")
......
...@@ -5,7 +5,7 @@ plates: ...@@ -5,7 +5,7 @@ plates:
# range of seconds until the dirty plate arrives. # range of seconds until the dirty plate arrives.
game: game:
time_limit_seconds: 20 time_limit_seconds: 12
meals: meals:
all: true all: true
......
...@@ -1435,18 +1435,9 @@ class PyGameGUI: ...@@ -1435,18 +1435,9 @@ class PyGameGUI:
self.reset_window_size() self.reset_window_size()
self.init_ui_elements() self.init_ui_elements()
self.reset_gui_values() self.reset_gui_values()
self.update_screen_elements() self.update_screen_elements()
self.reset_window_size()
self.init_ui_elements()
self.manage_button_visibility()
self.update_selection_elements()
# Game loop # Game loop
self.running = True self.running = True
# This dict can be left as-is, since pygame will generate a # This dict can be left as-is, since pygame will generate a
...@@ -1494,7 +1485,10 @@ class PyGameGUI: ...@@ -1494,7 +1485,10 @@ class PyGameGUI:
]: ]:
self.handle_key_event(event) self.handle_key_event(event)
if event.type in [pygame.JOYBUTTONDOWN, pygame.JOYBUTTONUP] and self.menu_state == MenuStates.Game: if (
event.type in [pygame.JOYBUTTONDOWN, pygame.JOYBUTTONUP]
and self.menu_state == MenuStates.Game
):
self.handle_joy_stick_event(event, joysticks=self.joysticks) self.handle_joy_stick_event(event, joysticks=self.joysticks)
self.manager.process_events(event) self.manager.process_events(event)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment