Garry's Mod Wiki

SANDBOX:AddToolMenuTabs

SANDBOX:AddToolMenuTabs()

Description

This hook is used to add new tool tabs to spawnmenu.

Example

Add a new tab and a few categories into it.

hook.Add( "AddToolMenuTabs", "myHookClass", function() spawnmenu.AddToolTab("myTab", "My Tab", "icon16/shield.png") -- Add a new tab spawnmenu.AddToolCategory("myTab", "myCategory", "My Category") -- Add a category into that new tab spawnmenu.AddToolMenuOption( "myTab", "myCategory", "myEntry", "My Entry", "", "", function( panel ) panel:AddControl( "Header", { Text = "Hello!" } ) end ) -- Add an entry to our new category end)

Page Links


Special Pages


Wikis

?

Render Time: 36ms

DB GetPage 6
Generate Html 0
SaveChanges (1) 14
Render Body 0
Render Sidebar 12