Garry's Mod Wiki

spawnmenu.GetContentType

  function spawnmenu.GetContentType( string contentType )

Description

Returns the function to create an vgui element for a specified content type, previously defined by spawnmenu.AddContentType.

If a content type doesn't exist, a dummy function will be returned, and a warning printed to the console.

You probably want to use spawnmenu.CreateContentIcon to create icons.

Arguments

1 string contentType
The content type name.

Returns

1 function
The panel creation function.
Function argument(s):
1 Panel container - The container panel to parent the created icon to.
2 table data - Data for the content type passed from spawnmenu.CreateContentIcon.
Function return value(s):
1 Panel pnl - The created panel