Revision Difference
spawnmenu.AddToolTab#518048
<function name="AddToolTab" parent="spawnmenu" type="libraryfunc">
<description>
Adds a new tool tab to the right side of the spawnmenu via the <page>SANDBOX:AddToolMenuTabs</page> hook.
This function is a inferior duplicate of <page>spawnmenu.GetToolMenu</page>, just without its return value.
</description>
<realm>Client</realm>
<args>
<arg name="name" type="string">The internal name of the tab. This is used for sorting.</arg>
<arg name="label" type="string" default="name">The 'nice' name of the tab (Tip: <page>language.Add</page>)</arg>
<arg name="label" type="string" default="name">The 'nice' name of the tab (Tip: <page>language.Add</page>)</arg>
<arg name="icon" type="string" default="icon16/wrench.png">The filepath to the icon of the tab. Should be a .png</arg>
</args>
</function>
<example>
<description>Creates a new tab named, "Tab name!" with a unique name and a wrench icon.</description>
<code>
hook.Add( "AddToolMenuTabs", "myHookClass", function()
spawnmenu.AddToolTab( "Tab name!", "#Unique_Name", "icon16/wrench.png" )
end )
</code>
</example>