Merge pull request #31 from kdmukai/exit_clear_screen

Clear screen on exit
This commit is contained in:
SeedSigner
2021-06-28 20:58:28 -05:00
committed by GitHub
2 changed files with 10 additions and 1 deletions
+5 -1
View File
@@ -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
+5
View File
@@ -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()