Regular API function


Description Attaches a menu entry in the simulator's module menu. This is useful if you created an plugin that can display a custom dialog in CoppeliaSim for specific settings/operations. If the user selects an item in the simulator's module menu, a sim_message_eventcallback_menuitemselected message is generated. See also the plugin simMessage entry point.
C synopsis simInt simAddModuleMenuEntry(const simChar* entryLabel,simInt itemCount,simInt* itemHandles)
C parameters
entryLabel: entry label. The same label can be used in consecutive calls (also from different plugins), in which case a sub-menu will group all items under the same label. If you do not plan adding several items, use "" for entryLabel.
itemCount: number of items, including separators. If entryLabel is "", then itemCount should be 1
itemHandles: pointer to the item handles. Make sure the pointer can hold "itemCount" number of elements. Use simSetModuleMenuItemState to set-up the individual items.
C return value
-1 if operation was not successful
Lua synopsis
Lua parameters
Lua return values