XPLMRemoveMenuItem

From X-Plane SDK
Jump to: navigation, search

XPLMRemoveMenuItem

XPLM_API void                 XPLMRemoveMenuItem(
                                   XPLMMenuID           inMenu,    
                                   int                  inIndex);    
Removes one item from a menu. Note that all menu items below are moved up one; your plugin must track the change in index numbers.

Note: prior to X-Plane 10.20, calling XPLMRemoveMenuItem on a menu item in the plugins menu was not reliable, because the menu item indices for the plugins menu were shared between all plugins. (Thus if one plugin removed an item from the plugins menu, the indices would be offset for all other plugins.)

10.20 fixes this: all plugins see only their own plugin menu items, starting at zero, and thus they cannot interfere with each other.