SANDBOX:AddToolMenuTabs

From Garry's Mod
Jump to: navigation, search
 SANDBOX:AddToolMenuTabs( )

Description

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

Examples

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)


Personal tools
Navigation