Table of Contents
zmenu_InsertItemDescriptionAdd an item to the menu in L3DT. Files
Function prototypebool zmenu_InsertItem(const char* lpScript, const char* lpItemText, unsigned long MenuContext, unsigned long Flags); Arguments
Return valueFalse if an error occurred, and true otherwise. CommentsUse with zfunc_LoadThe lpFnName argument must be the name of a function loaded from your plugin via the zfunc_Load method. See the example provided below. Menu contentsBy default, this function adds the menu item into the 'Extensions→[your plugin name]' menu in L3DT. However, using the MenuContext argument, you may insert your item into other menus. The following values are recognised:
Sub-menusThe '.' (dot) character is used to delimit nested submenus. Thus, if you provide an lpOptionName of “mysubmenu.myoption”, your option will appear at 'Extensions→[your plugin name]→mysubmenu→myoption' (assuming the default MenuContext). Unfortunately, this means you cannot use dots for abbreviations or ellipsis (e.g. 'about…') ExampleThis is from the InitPlugin function of L3DTio_TorqueTER: // load the extension function zfunc_Load("L3DTio_TorqueTER.T3D.MaterialManagerUI", "ExtT3DMtlManagerUI", VarID_void, NULL); // load the menu item for the function zmenu_InsertItem("T3D.MaterialManagerUI", "L3DTio_TorqueTER.Torque T3D.Material Manager", ZMENU_CONTEXT_FILE_EXPORT, 0); Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
|