Element representing the base class for menu items.
Properties:
Name | Type | Description |
---|---|---|
selected |
bool | [readonly] Whether the menu item is currently selected. |
highlighted |
bool | [readonly] Whether the menu item is currently highlighted (not necessarily selected). |
menu |
fengshui.Template | (default: |
menuOpened |
bool | [readonly] Whether the submenu is currently opened. |
Extends
Methods
-
Closes the submenu.
-
Returns whether one of the sibling menu items has a submenu opened.
Returns:
Type Description bool Whether a sibling menu item has a submenu opened. -
Selects this menu item.
Name Type Description activate
bool Whether the item should be activated to open its submenu.
-
Shows the submenu if there is one.
-
Directs a function to the previous or next sibling.
Name Type Description direction
number If
-1
, targets the previous sibling. If1
, targets the next sibling.f
function The function to execute. Takes the sibling instance as parameter.
-
Unselects all sibling menu items.