SpawnIcon
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 active Sub Model IDs for each Body Group 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 active Sub Model ID for the given Body Group ID, 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.