mirror of
https://github.com/SeedSigner/seedsigner.git
synced 2026-10-05 23:18:25 +00:00
Merge pull request #31 from kdmukai/exit_clear_screen
Clear screen on exit
This commit is contained in:
@@ -47,7 +47,11 @@ class Controller:
|
||||
def start(self) -> None:
|
||||
if self.DEBUG:
|
||||
# Let Exceptions halt execution
|
||||
self.show_main_menu()
|
||||
try:
|
||||
self.show_main_menu()
|
||||
finally:
|
||||
# Clear the screen when exiting
|
||||
self.menu_view.display_blank_screen()
|
||||
|
||||
else:
|
||||
# Handle Unexpected crashes by restarting up to 3 times
|
||||
|
||||
@@ -192,3 +192,8 @@ class View:
|
||||
tw, th = View.draw.textsize(line4, font=View.IMPACT20)
|
||||
View.draw.text(((240-tw)/2, 160), line4, fill="ORANGE", font=View.IMPACT20)
|
||||
View.DispShowImage()
|
||||
|
||||
|
||||
def display_blank_screen(self):
|
||||
View.draw.rectangle((0, 0, View.canvas_width, View.canvas_height), outline=0, fill=0)
|
||||
View.DispShowImage()
|
||||
|
||||
Reference in New Issue
Block a user