You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Add initial FirstRun app
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "FirstRun",
|
||||
"publisher": "MicroPythonOS",
|
||||
"short_description": "Welcomes the user and gives a few pointers on how to control the UI.",
|
||||
"icon_url": "https://apps.micropythonos.com/apps/com.micropythonos.firstrun/icons/com.micropythonos.firstrun_0.0.1_64x64.png",
|
||||
"download_url": "https://apps.micropythonos.com/apps/com.micropythonos.firstrun/mpks/com.micropythonos.firstrun_0.0.1.mpk",
|
||||
"fullname": "com.micropythonos.firstrun",
|
||||
"version": "0.0.1",
|
||||
"category": "help",
|
||||
"activities": [
|
||||
{
|
||||
"entrypoint": "assets/firstrun.py",
|
||||
"classname": "FirstRun",
|
||||
"intent_filters": [
|
||||
{
|
||||
"action": "main",
|
||||
"category": "launcher"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
from mpos import Activity
|
||||
|
||||
class FirstRun(Activity):
|
||||
|
||||
def onCreate(self):
|
||||
screen = lv.obj()
|
||||
label = lv.label(screen)
|
||||
label.align(lv.ALIGN.TOP_LEFT, 0, 0)
|
||||
label.set_width(lv.pct(100))
|
||||
touchhelp = "swipe from the left edge to go back and from the top edge to open the menu."
|
||||
label.set_text(f'''
|
||||
Welcome!
|
||||
|
||||
This app will explain how to move around in MicroPythonOS.
|
||||
|
||||
If you're on a touch screen, {touchhelp}
|
||||
|
||||
If you've got 3 buttons, one is PREVIOUS, one is ENTER and one is NEXT. To go back, press PREVIOUS and NEXT together.
|
||||
|
||||
If you've got 2 buttons, one is PREVIOUS, the other is NEXT. To ENTER, press both at the same time. To go back, long-press PREVIOUS.
|
||||
''')
|
||||
label.set_long_mode(lv.label.LONG_MODE.WRAP)
|
||||
self.setContentView(screen)
|
||||
@@ -86,7 +86,7 @@ class Launcher(Activity):
|
||||
iconcont_height = icon_size + label_height
|
||||
|
||||
for app in AppManager.get_app_list():
|
||||
if app.category == "launcher":
|
||||
if app.category == "launcher" or app.fullname == "com.micropythonos.firstrun":
|
||||
continue
|
||||
|
||||
app_name = app.name
|
||||
|
||||
Reference in New Issue
Block a user