Adds an item to a parent POPUP_MENU or MENU_ITEM.
None.
Name | Value Type | Default Value | Description | Comment | V. | Exp. |
---|---|---|---|---|---|---|
name |
Empty |
Name to be displayed in the menu item. |
The name is overriden by the name of the action when an action is used. |
2.0 |
No | |
action_id |
Empty |
Identifier of the target action to be executed when the menu item is selected. |
Optional. When used, the name of the action is displayed, instead of the "name" attribute. |
2.0 |
No | |
checked_param_id |
empty |
Identifier of the parameter used to determine if the menu item should be checked. |
Optional. When used, the menu item is checked when the target parameter is different from 0. |
2.0 |
No |
See POPUP_MENU element for basic examples.
Below is a more advanced example showing how to use menu items with actions and parameters.
<SKIN text_color="#ffffff" width="300" height="120" layout_type="layer_stack" margin="10"> <!-- Define action & parameter for the menu item--> <ACTION id="my_action" name="Show Alert" type="DisplayMessageBox" message="Alert!"/> <PARAM id="my_param" type="boolean" default="1"/> <!-- The menu--> <POPUP_MENU id="menu"> <MENU_ITEM action_id="my_action"/> <MENU_ITEM name="Item2" checked_param_id="my_param"/> </POPUP_MENU> <!-- The button to show the menu--> <TEXT value="Click Me!" h_align="left" v_align="top"> <INVISIBLE_ACTION_BUTTON action_id="menu.Popup" width="100%" height="100%"/> </TEXT> </SKIN>