EMF_Camp_Badge/launcher/main.py

24 lines
526 B
Python
Raw Normal View History

2018-07-15 06:53:48 -04:00
"""Launcher for apps currently installed"""
___name___ = "Launcher"
___license___ = "MIT"
2018-07-15 06:53:48 -04:00
___categories___ = ["System"]
2018-08-05 17:14:31 -04:00
___dependencies___ = ["dialogs", "app"]
2018-07-15 06:53:48 -04:00
___launchable___ = False
___bootstrapped___ = True
2018-07-30 16:30:52 -04:00
import ugfx
2018-08-05 17:14:31 -04:00
from app import *
from dialogs import *
2018-07-30 16:30:52 -04:00
2018-08-05 17:14:31 -04:00
ugfx.init()
2018-07-30 16:30:52 -04:00
ugfx.clear()
2018-08-05 17:14:31 -04:00
options = [{"title": a.title, "app": a} for a in get_apps()]
option = prompt_option(options, none_text="Homescreen", text="Select App to start")
2018-07-30 16:30:52 -04:00
2018-08-05 17:14:31 -04:00
if not option:
restart_to_default()
else:
option["app"].boot()