ClearMenuItems

Category: Objects / Menu
Since engine version: 4.9.1.0 GWE

Description

Removes all entries from a menu.

Syntax

int ClearMenuItems (object pMenuObject);

Parameter

pMenuObject:
[opt] Object for which to clear all menu entries. Can be 0 in local calls.

Example

var pClonk=GetCursor();
CreateMenu(CLNK, pClonk, pClonk, 0, "", 0, 2);
AddMenuItem("", "", TIM1, pClonk,0,0,"Alter Text");

[...]

ClearMenuItems(pClonk);
AddMenuItem(0, "", TIM1, pClonk,0,0,"Neuer Text");
Opens a text window containing the entry "Old Text" for the selected clonk. Then changes the entry to "New Text".
See also: AddMenuItem, CloseMenu, CreateMenu
Sven2, Juni 2003