TopMenu.AddCategory Method

Adds a category to a TopMenu.

TopMenuObject AddCategory(const char[] name, TopMenuHandler handler, const char[] cmdname, int flags, const char[] info_string)

Parameters

const char[] name

Object name (MUST be unique).

TopMenuHandler handler

Handler for topobj.

const char[] cmdname

Command name (for access overrides).

int flags

Default access flags.

const char[] info_string

Arbitrary storage (max 255 bytes).

Return Value

A new TopMenuObject ID, or INVALID_TOPMENUOBJECT on failure.