acid-drop

- Hacking the planet from a LilyGo T-Deck using custom firmware
git clone git://git.acid.vegas/acid-drop.git
Log | Files | Refs | Archive | README | LICENSE

lv_example_menu_1.py (619B)

      1 # Create a menu object
      2 menu = lv.menu(lv.scr_act())
      3 menu.set_size(320, 240)
      4 menu.center()
      5 
      6 # Create a sub page
      7 sub_page = lv.menu_page(menu, None)
      8 cont = lv.menu_cont(sub_page)
      9 label = lv.label(cont)
     10 label.set_text("Hello, I am hiding here")
     11 
     12 # Create a main page
     13 main_page = lv.menu_page(menu, None)
     14 
     15 cont = lv.menu_cont(main_page)
     16 label = lv.label(cont)
     17 label.set_text("Item 1")
     18 
     19 cont = lv.menu_cont(main_page)
     20 label = lv.label(cont)
     21 label.set_text("Item 2")
     22 
     23 cont = lv.menu_cont(main_page)
     24 label = lv.label(cont)
     25 label.set_text("Item 3 (Click me!)")
     26 menu.set_load_page_event(cont, sub_page)
     27 
     28 menu.set_page(main_page)