Skip to content

lvgl.menu

lvgl.menu(params)

Open a popup menu with multiple options to choose from, using EdgeTX styling.

Parameters

NameReqTypeDescription
paramsyestable
FieldTypeDescription
titlestringtext displayed in the popup's header, defaults to an empty string
valuestablesimple table of option strings shown in the popup, defaults to an empty list
getfunctioncalled when the popup is opened, to get the index of the currently selected option (1..number of values), defaults to nil
setfunctioncalled when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil

Returns

Name Type Description
none unknown

Availability

  • Since: 2.11.1
  • Radio support: color-lcd

Notes

  • The common object settings (x, y, w, h, color, etc.) are not used by lvgl.menu -- only the settings listed above apply. @notice The popup closes and set is called when the user selects an item. @notice If the user taps outside the popup or presses RTN, the popup closes without calling set.

Source

radio/src/lua/api_colorlcd_lvgl.cpp