Garry's Mod Wiki

DKillIcon

Description

Uses the killicon to persistently draw a killicon.

View source

Parent

Derives methods, etc not listed on this page from Panel.

Methods

string DKillIcon:GetName()
Gets the killicon being shown.
DKillIcon:SetName( string iconName )
Sets the killicon to be displayed. You should call Panel:SizeToContents following this. Killicons can be added with killicon. Add and killicon. AddFont.

Example

Creates a DKillIcon and sets it to the crowbar killicon.

local frame = vgui.Create("DFrame") frame:SetSize(200,200) frame:Center() frame:SetTitle("DKillIcon Example") local icon = vgui.Create("DKillIcon", frame) icon:SetName("weapon_crowbar") icon:SizeToContents() icon:Center()
Output: