Difference between revisions of "Gb.menu"
From Gamebuino Wiki
m (→Example: added name in begin()) |
(→Example: source from github) |
||
Line 15: | Line 15: | ||
== Example == | == Example == | ||
− | < | + | <gistit>https://github.com/Rodot/Gamebuino/blob/master/libraries/Gamebuino/examples/5.Reference/core/menu/menu.ino</gistit> |
− | |||
− | |||
− | Gamebuino | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | </ | ||
== See also == | == See also == | ||
*[http://arduino.cc/en/Reference/String string (Arduino reference)] | *[http://arduino.cc/en/Reference/String string (Arduino reference)] | ||
*[http://arduino.cc/en/Reference/PROGMEM progmem (Arduino reference)] | *[http://arduino.cc/en/Reference/PROGMEM progmem (Arduino reference)] |
Revision as of 2014-05-19T09:35:25
Description
Displays a menu to select from a list of items.
Syntax
gb.menu(menu, MENULENGTH);
Parameters
- menu (char** PROGMEM): the items to select from, stored as a PROGMEM array of strings (see example below).
- MENULENGTH (byte): the number of items in the menu.
Returns
The number of the item selected, or -1 if menu is left without selecting an item (char).
Example