Skip to content
Snippets Groups Projects
Verified Commit 3445a353 authored by rahix's avatar rahix
Browse files

feat(menu): Show a loading screen


When a traveller has many apps installed, loading the menu takes some
time.  To give them feedback that card10 is in fact loading the menu
right now, immediately display a loading message before starting to
enumerate the app list.

Signed-off-by: default avatarRahix <rahix@rahix.de>
parent d33d880b
No related branches found
No related tags found
No related merge requests found
......@@ -74,6 +74,14 @@ class MainMenu(simple_menu.Menu):
pass
def loading_message():
with display.open() as disp:
disp.clear(color.CHAOSBLUE)
disp.print("Loading", posx=31, posy=20)
disp.print("menu ...", posx=24, posy=40)
disp.update()
def no_apps_message():
"""Display a warning if no apps are installed."""
with display.open() as disp:
......@@ -91,6 +99,8 @@ def no_apps_message():
if __name__ == "__main__":
loading_message()
try:
apps = list(enumerate_entries())
except OSError:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment