Category: Objects / Menu
Since engine version: 1.0 OC
Creates a user defined menu for the specified object. Menu entries are to be added using AddMenuItem.
bool CreateMenu(id symbol, object command_object, int extra, string caption, int extra_data, int style, bool permanent, id menu_id);
- The picture of this object definition is used as symbol.
- Object to receive the menu command (see AddMenuItem). Can be
nilin local calls.
- Additional information to be displayed about the currently selected entry. C4MN_ values are now also defined as constants:
Constant Value Effect C4MN_Extra_None 0 Nothing C4MN_Extra_Value 2 Value C4MN_Extra_Info 4 Display object description immediately.
- Text to be displayed if the menu is empty.
- Comparison value for extra 3.
- Appearance of the menu. The following constants are defined:
Constant Value Appearance C4MN_Style_Normal 0 Normal C4MN_Style_Context 1 Context menu C4MN_Style_Info 2 Info menu C4MN_Style_Dialog 3 Dialog C4MN_Style_EqualItemHeight 128 Can be combined with C4MN_Style_Dialog: all entries with an icon are drawn with the same height.
- The menu stays open after an entry has been selected.
- [opt] If specified, this id is used as menu id. The current menu id is returned by GetMenu