1
0
Fork 0

flake8 fixes

This commit is contained in:
Michał Rudowicz 2024-09-08 17:20:47 +02:00
parent c330fa0bfe
commit 64ea237071
1 changed files with 3 additions and 1 deletions

View File

@ -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}")