diff --git a/menu.py b/menu.py index 5580913..2609cb9 100644 --- a/menu.py +++ b/menu.py @@ -105,7 +105,6 @@ class MenuBoard(IBoard): current_button_row += 1 yield pygame.Rect(left, top, button_width, button_height) - def handle_event(self, event: pygame.event.Event): for b in self.buttons: b.handle_event(event) @@ -134,11 +133,14 @@ class App: def button_press_handler(self, text: str) -> Callable[[], None]: def impl(): previous_board = self.board + def thr_fun(): def end_thr(): self.board = previous_board + sleep(5) self.task_q.put(end_thr) + process_thr = Thread(target=thr_fun) process_thr.start() self.board = MessageBoard(self.get_screen_rect(), f"Wait: {text}")