SetMenu

void SetMenu(number menuItem, [number subfunction, params])

Sets a menu item's properties. Following the menuItem, you can specify how you want to modify the item with parameters. Each parameter has a type ID, specified in SCI.SH.

The parameters are as follows:

smMENU_SAID
1 parameter, a said string.

If the said string is said, the item's handleEvent() is called.

Example
SetMenu($202 smMENU_SAID 'save[/game]')
smMENU_TEXT

1 parameter, a string.

It sets the menu item's text to the given string.

Example
SetMenu($202 smMENU_TEXT "Save a Game")
smMENU_SHORTCUTKEY
1 parameter, a number.

Sets the menu item's shortcut key to the specified parameter. See KEYS.SH for the keycodes.

Example
SetMenu($202 smMENU_SHORTCUTKEY KEY_F5)
smMENU_ENABLE
1 parameter, a bool.

If the parameter is TRUE, it enables the menu item. Otherwise, it disables it.

Example
SetMenu($202 smMENU_ENABLE FALSE)

See Also: GetMenu, AddMenu