mirror of https://git.sr.ht/~michalr/menu
flake8 fixes
This commit is contained in:
parent
c330fa0bfe
commit
64ea237071
4
menu.py
4
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}")
|
||||
|
|
Loading…
Reference in New Issue