AddToTopMenu

Last Updated2014-06-27
Created At2007-09-26

Adds an topobj to a TopMenu.

native TopMenuObject AddToTopMenu(Handle topmenu, const char[] name, TopMenuObjectType type, TopMenuHandler handler, TopMenuObject parent, const char[] cmdname = "", int flags = 0, const char[] info_string = "")

Parameters

Handle topmenu
TopMenu Handle.
const char[] name
Object name (MUST be unique).
Object type.
Handler for topobj.
Parent topobj ID, or INVALID_TOPMENUOBJECT for none. Items must have a category parent. Categories must not have a parent.
const char[] cmdname
Command name (for access overrides).
int flags
Default access flags.
const char[] info_string
Arbitrary storage (max 255 bytes).

Return Value

TopMenuObject A new TopMenuObject ID, or INVALID_TOPMENUOBJECT on failure.

Error

Invalid TopMenu Handle.