|
FabGL
ESP32 Display Controller and Graphics Library
|
| int menu | ( | char const * | titleText, |
| char const * | messageText, | ||
| StringList * | items | ||
| ) |
Shows a dialog with a label and a list box. The dialog exits when an item is selected, just like a menu.
| titleText | Optional title of the dialog (nullptr = the dialogs hasn't a title) |
| messageText | Message to show |
| items | StringList object containing the items to show into the listbox |
Example:
InputBox ib;
ib.begin();
StringList list;
list.append("Menu item 0");
list.append("Menu item 1");
list.append("Menu item 2");
list.append("Menu item 3");
int s = ib.menu("Menu", "Click on a menu item", &list);
ib.messageFmt("", nullptr, "OK", "You have selected %d", s);
ib.end();
Definition at line 251 of file inputbox.cpp.