Garry's Mod Wiki

Garry's Mod Wiki

  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

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...