Garry's Mod Wiki

SpawnmenuContentPanel

Description

The default SpawnmenuContentPanel

This is used internally - although you're able to use it you probably shouldn't.

View source

Parent

Derives methods, etc not listed on this page from DPanel.

Implements

Implements or overrides the following hooks/methods. If you want to override these, you probably want to call the original function too.

Methods

SpawnmenuContentPanel:CallPopulateHook( string hookname )
Changes the Spawnmenu category to search in
SpawnmenuContentPanel:EnableModify()
Allows the modification of the ContentSidebar
SpawnmenuContentPanel:EnableSearch( string category, string hookname )
Changes the Spawnmenu category to search in
SpawnmenuContentPanel:SwitchPanel( Panel panel )
Switches the current panel with the given panel

Example

How the SpawnmenuContentPanel is created

local function CreateContentPanel() local ctrl = vgui.Create( "SpawnmenuContentPanel" ) ctrl.OldSpawnlists = ctrl.ContentNavBar.Tree:AddNode( "#spawnmenu.category.browse", "icon16/cog.png" ) ctrl:EnableModify() hook.Call( "PopulatePropMenu", GAMEMODE ) ctrl:CallPopulateHook( "PopulateContent" ) ctrl.OldSpawnlists:MoveToFront() ctrl.OldSpawnlists:SetExpanded( true ) return ctrl end spawnmenu.AddCreationTab( "#spawnmenu.content_tab", CreateContentPanel, "icon16/application_view_tile.png", -10 )