2018-07-15 06:53:48 -04:00
|
|
|
"""Launcher for apps currently installed"""
|
|
|
|
|
|
|
|
___name___ = "Launcher"
|
2018-07-29 12:33:46 -04:00
|
|
|
___license___ = "MIT"
|
2018-07-15 06:53:48 -04:00
|
|
|
___categories___ = ["System"]
|
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()
|