I think you had this on your screen
from picoware.gui.draw import Draw
from picoware.gui.menu import Menu
from picoware.system.colors import TFT_WHITE, TFT_BLACK, TFT_BLUE
# create draw instance
draw = Draw()
# create menu instance
menu = Menu(
draw, # draw instance
"menu", # title
0, # y position
320, # height
TFT_WHITE, # text color
TFT_BLACK, # background color
selected_color=TFT_BLUE, # selected item color
border_color=TFT_WHITE, # border color
)
# add items to the menu
menu.add_item("Item 1")
menu.add_item("Item 2")
# set the selected item
menu.set_selected(0)
# render the menu
menu.draw()
That’s from the GUI components examples (it just shows a basic rundown of how to setup the Menu and use the underlying methods)
Here’s an app example (from Picoware/builds/MicroPython/apps_unfrozen/menu-simple.py at main · jblanked/Picoware · GitHub):
# picoware/apps/menu-simple.py
_menu = None
def start(view_manager) -> bool:
"""Start the App"""
from picoware.gui.menu import Menu
from picoware.system.colors import TFT_WHITE, TFT_BLACK, TFT_BLUE
global _menu
if not _menu:
draw = view_manager.draw
# set menu
_menu = Menu(
draw, # draw instance
"Menu Simple", # title
0, # y position
draw.size.y, # height
TFT_WHITE, # text color
TFT_BLACK, # background color
TFT_BLUE, # selected item color
TFT_WHITE, # border color
)
# add items
_menu.add_item("First Item")
_menu.add_item("Second Item")
_menu.add_item("Third Item")
# quick add 4-19
for i in range(4, 20):
_menu.add_item(f"Item {i}")
_menu.set_selected(0)
return True
def run(view_manager) -> None:
"""Run the App"""
from picoware.system.buttons import BUTTON_UP, BUTTON_DOWN, BUTTON_BACK
inp = view_manager.input_manager
button = inp.button
if button == BUTTON_UP:
inp.reset()
_menu.scroll_up()
elif button == BUTTON_DOWN:
inp.reset()
_menu.scroll_down()
elif button == BUTTON_BACK:
inp.reset()
view_manager.back()
def stop(view_manager) -> None:
"""Stop the App"""
from gc import collect
global _menu
if _menu:
del _menu
_menu = None
collect()
but in Thonny you’ll need to add this at the bottom → Picoware/guides/Apps.md at main · jblanked/Picoware · GitHub

