Garry's Mod Wiki
Description
A "spawn icon" displays an image for the given model path. It is mostly used in the Spawn Menu (q). It uses ModelImage internally.
Parent
Derives methods, etc not listed on this page from DButton.
Methods
string SpawnIcon:GetBodyGroup()
Returns the currently set body groups of the spawn icon. This is set by SpawnIcon:SetBodyGroup.
string SpawnIcon:GetModelName()
Returns the currently set model name. This is set by SpawnIcon:SetModelName.
Returns the currently set skin of the spawnicon. This is set by SpawnIcon:SetSkinID.
SpawnIcon:OpenMenu()
Called when right clicked on the SpawnIcon. It will not be called if there is a selection (Panel:GetSelectionCanvas), in which case SANDBOX:SpawnlistOpenGenericMenu is called.
This is used internally - although you're able to use it you probably shouldn't.
This is done automatically by SpawnIcon. You do not need to call this. Doing so may cause unforeseen consequences.
Sets the bodygroups, so it can be retrieved with SpawnIcon:GetBodyGroup. Use Panel:SetModel instead.
SpawnIcon:SetModelName( string mdl )
This is used internally - although you're able to use it you probably shouldn't.
This is done automatically by SpawnIcon. You do not need to call this. Doing so may cause unforeseen consequences.
Sets the model name, so it can be retrieved with SpawnIcon:GetModelName. Use Panel:SetModel instead.
This is used internally - although you're able to use it you probably shouldn't.
This is done automatically by SpawnIcon. You do not need to call this. Doing so may cause unforeseen consequences.
Sets the skin id of the spawn icon, so it can be retrieved with SpawnIcon:GetSkinID. Use Panel:SetModel instead.
Example
Creates a DFrame with a SpawnIcon inside.
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 four times a day. Edits and history are not available.
Last Parsed: Loading...