spawnmenu.AddToolCategory

From Garry's Mod
Jump to: navigation, search
 spawnmenu.AddToolCategory( )

Contents

Description

Used to create a new category in the list inside of a spawnmenu ToolTab.

You must call this function from SANDBOX:AddToolMenuCategories for it to work properly.

Arguments

string tab

The ToolTab name, as created with spawnmenu.AddToolTab.

You can also use the default ToolTab names "Main" and "Utilities".

Arguments

string RealName

The identifier name

Arguments

string PrintName

The displayed name

Examples

Example

Adds the Constraints category to the Main ToolTab. See lua\includes\modules\spawnmenu.lua.

spawnmenu.AddToolCategory( "Main", "Constraints", "#spawnmenu.tools.constraints" )


Examples

Example

Adds the User category to the Utilities ToolTab. See lua\autorun\utilities_menu.lua.

spawnmenu.AddToolCategory( "Utilities", "User", "#spawnmenu.utilities.user" )


Personal tools
Navigation