ISUplink:ismenu (Object Type)

From Lavish Software Wiki
Jump to navigation Jump to search

Description

Object Type Vitals
ismenu
Defined By Inner Space Uplink
Inherits none
Reduces To Same as ID
Variable Object Type none
Uses Sub-Types no
C/C++ Type CustomMenuItem *

A custom menu on the Inner Space menu.

Members

  • ismenucommand AddCommand[name,command]: Adds a command item with the given name to execute the given command, returning the new object. If it already existed or the name is invalid (a number, or empty), no object is given.
  • ismenuseparator AddSeparator[name]: Yes, you have to name it. Adds a separator with the given name, returning the new object. If it already existed or the name is invalid, no object is given.
  • ismenu AddSubMenu[name]: Adds a sub-menu with the given name, returning the new object. If it already existed or the name is invalid, no object is given.
  • ... Children: The first child item of this menu. The return type will be one of ismenu, ismenucommand, or ismenuseparator
  • ... FindChild[#]: Finds a child item by ID. The return type will be one of ismenu, ismenucommand, or ismenuseparator
  • ... FindChild[name]: Finds a child item by name. The return type will be one of ismenu, ismenucommand, or ismenuseparator
  • int ChildCount: The number of children of this menu

Methods

  • Clear: Clears (Removes) all children of this menu (and all of the children's children, and so on). That's familicide. You should feel bad for doing it.
  • AddCommand[name,command]: Adds a command item with the given name to execute the given command. If it already existed or the name is invalid (a number, or empty), the method fails.
  • AddSeparator[name]: Yes, you have to name it. Adds a separator with the given name. If it already existed or the name is invalid, the method fails.
  • AddSubMenu[name]: Adds a sub-menu with the given name. If it already existed or the name is invalid, the method fails.

Examples

function main()
{
	variable int mbmenu
	mbmenu:Set[${ISMenu.AddSubMenu["WoW Multiboxing"]}]
	ISMenu[${mbmenu}]:AddCommand[Launch 3,"run wow 3"]
	ISMenu[${mbmenu}]:AddCommand[Launch 4,"run wow 4"]
	ISMenu[${mbmenu}]:AddCommand[Launch 5,"run wow 5"] 
}

See Also