Garry's Mod Wiki

Revision Difference

SpawnmenuContentPanel#548082

<panel> <parent>DPanel</parent> <preview>DButton_small.png</preview> <description> The default SpawnmenuContentPanel <internal></internal> </description> <overrides> <page>PANEL:Init</page> </overrides> </panel> <example> <description>How the SpawnmenuContentPanel is created</description> <code> 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 ) </code> </example>⤶ ⤶ # Methods⤶ * <page>SpawnmenuContentPanel:EnableModify</page>⤶ * <page>SpawnmenuContentPanel:EnableSearch</page>⤶ * <page>SpawnmenuContentPanel:CallPopulateHook</page>⤶ * <page>SpawnmenuContentPanel:SwitchPanel</page></example>