Share

Interface: CuiMenuItem

This interface exposes the properties and methods for individual menu items. Note that all these properties are read-only. Menu items are created at startup, and cannot be modified later.

Properties:

    .id : guid : Read

The menu item's unique ID.

    .isSeparator : boolean : Read

Gets whether this menu item is a menu separator.

    .isAction : boolean : Read

Returns false.

    .action : Interface : Read

Returns undefined.

    .isSubMenu : boolean : Read

Gets whether this menu item is a sub menu. Sub menus generally have child menu items, exposed in the .subMenu property (below).

    .subMenu : Interface : Read

Gets the CuiMenu interface for this menu item if it is a sub menu.

    .isDynamicMenu : boolean : Read

Gets whether this menu item is dynamic.

    .parent : Interface : Read

Gets the parent for this menu item, or undefined if there is no parent.

Methods:

    <boolean>Move <guid>parentMenuId beforeId:<guid>
       Move - no automatic redraw after invoked
       beforeId default value: "00000000-0000-0000-0000-000000000000"

Moves this menu item before the menu item specified by beforeId, in the parent menu specified by parentMenuId.

Was this information helpful?