mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-16 21:33:46 +03:00
39 lines
707 B
Lua
39 lines
707 B
Lua
--[[
|
|
| This file was obtained through the combined efforts
|
|
| of Madbluntz & Plymouth Antiquarian Society.
|
|
|
|
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
|
| Maloy, DrPepper10 @ RIP, Atle!
|
|
|
|
|
| Visit for more: https://plymouth.thetwilightzone.ru/
|
|
--]]
|
|
|
|
|
|
local PANEL = {}
|
|
|
|
AccessorFunc( PANEL, "m_Name", "Name" )
|
|
|
|
function PANEL:Init()
|
|
|
|
self.m_Name = ""
|
|
self.m_fOffset = 0
|
|
self:NoClipping( true )
|
|
|
|
end
|
|
|
|
function PANEL:SizeToContents()
|
|
|
|
local w, h = killicon.GetSize( self.m_Name )
|
|
self.m_fOffset = h * 0.1
|
|
self:SetSize( w, 5 )
|
|
|
|
end
|
|
|
|
function PANEL:Paint()
|
|
|
|
killicon.Draw( self:GetWide() * 0.5, self.m_fOffset, self.m_Name, 255 )
|
|
|
|
end
|
|
|
|
derma.DefineControl( "DKillIcon", "A kill icon", PANEL, "Panel" )
|