spawnmenu.AddToolTab

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

Contents

Description

Adds a new tool tab to the right side of the spawnmenu via the SANDBOX:AddToolMenuTabs hook.

This function is a inferior duplicate of spawnmenu.GetToolMenu, just without its return value.

Arguments

string name

The internal name of the tab. This is used for sorting.

Arguments

string label=name

The 'nice' name of the tab (Tip: language.Add)

Arguments

string icon="icon16/wrench.png"

The filepath to the icon of the tab. Should be a .png

Examples

Example

Creates a new tab named, "Tab name!" with a unique name and a wrench icon.

hook.Add( "AddToolMenuTabs", "myHookClass", function()
	spawnmenu.AddToolTab( "Tab name!", "#Unique_Name", "icon16/wrench.png" )
end )


Personal tools
Navigation