Difference between revisions of "Gb.menu"
From Gamebuino Wiki
m (→Example: path changed to beta branch) |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{lowercase}} |
__NOTOC__ | __NOTOC__ | ||
− | = Description = | + | == Description == |
Displays a menu to select from a list of items. | Displays a menu to select from a list of items. | ||
− | = Syntax = | + | == Syntax == |
<pre>gb.menu(menu, MENULENGTH);</pre> | <pre>gb.menu(menu, MENULENGTH);</pre> | ||
− | = Parameters = | + | == Parameters == |
* menu (char** PROGMEM): the items to select from, stored as a PROGMEM array of strings (see example below). | * 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. | * MENULENGTH (byte): the number of items in the menu. | ||
− | = Returns = | + | == Returns == |
The number of the item selected, or -1 if menu is left without selecting an item (''char''). | The number of the item selected, or -1 if menu is left without selecting an item (''char''). | ||
− | = Example = | + | == Example == |
− | < | + | <gistit>https://github.com/Rodot/Gamebuino/blob/beta/libraries/Gamebuino/examples/5.Reference/interface/menu/menu.ino</gistit> |
− | |||
− | |||
− | |||
− | + | == 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)] |
Latest revision as of 2014-09-05T22:53:52
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