mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
task_handler each 1ms for higher framerate, start firstrun at startup, remove launcher icon (not needed)
This commit is contained in:
@@ -2,10 +2,12 @@ from mpos import Activity
|
||||
|
||||
class FirstRun(Activity):
|
||||
|
||||
dontshow_checkbox = None
|
||||
|
||||
def onCreate(self):
|
||||
screen = lv.obj()
|
||||
screen.set_flex_flow(lv.FLEX_FLOW.COLUMN)
|
||||
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'''
|
||||
@@ -20,4 +22,18 @@ If you've got 3 buttons, one is PREVIOUS, one is ENTER and one is NEXT. To go ba
|
||||
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.dontshow_checkbox = lv.checkbox(screen)
|
||||
self.dontshow_checkbox.set_text("Don't show again")
|
||||
|
||||
closebutton = lv.button(screen)
|
||||
closebutton.add_event_cb(lambda *args: self.finish(), lv.EVENT.CLICKED, None)
|
||||
closelabel = lv.label(closebutton)
|
||||
closelabel.set_text("Close")
|
||||
|
||||
self.setContentView(screen)
|
||||
|
||||
def onPause(self, screen):
|
||||
checked = self.dontshow_checkbox.get_state() & lv.STATE.CHECKED
|
||||
if checked:
|
||||
print("TODO: make sure this doesn't appear again")
|
||||
|
||||
@@ -86,7 +86,7 @@ class Launcher(Activity):
|
||||
iconcont_height = icon_size + label_height
|
||||
|
||||
for app in AppManager.get_app_list():
|
||||
if app.category == "launcher" or app.fullname == "com.micropythonos.firstrun":
|
||||
if app.category == "launcher":
|
||||
continue
|
||||
|
||||
app_name = app.name
|
||||
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 6.2 KiB |
Reference in New Issue
Block a user