EMF_Camp_Badge/launcher/main.py

24 lines
567 B
Python
Raw Normal View History

2018-07-15 06:53:48 -04:00
"""Launcher for apps currently installed"""
2018-09-03 09:59:37 -04:00
___title___ = "Launcher"
___license___ = "MIT"
___categories___ = ["System", "Launcher"]
2018-08-26 15:27:23 -04:00
___dependencies___ = ["dialogs", "app", "ugfx_helper"]
2018-07-15 06:53:48 -04:00
___launchable___ = False
___bootstrapped___ = True
2018-08-26 15:27:23 -04:00
import ugfx_helper, 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-26 15:27:23 -04:00
ugfx_helper.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()]
2018-08-31 14:55:38 -04:00
option = prompt_option(options, none_text="Home", 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()