http://luabin.foszor.com/code/gamemodes/base/gamemode/cl_voice.lua
I want to change the color that voice notification panel is.
The problem is I can’t hook into it conventionally, or not to my knowledge.
How would I go about it?
http://luabin.foszor.com/code/gamemodes/base/gamemode/cl_voice.lua
I want to change the color that voice notification panel is.
The problem is I can’t hook into it conventionally, or not to my knowledge.
How would I go about it?
It’s at the bottom of the default skin in addons/derma/lua/skins/default.lua.
[lua]/---------------------------------------------------------
VoiceNotify
---------------------------------------------------------/
function SKIN:PaintVoiceNotify( panel )
local w, h = panel:GetSize()
self:DrawGenericBackground( 0, 0, w, h, panel.Color )
self:DrawGenericBackground( 1, 1, w-2, h-2, Color( 60, 60, 60, 240 ) )
end
function SKIN:SchemeVoiceNotify( panel )
panel.LabelName:SetFont( "TabLarge" )
panel.LabelName:SetContentAlignment( 4 )
panel.LabelName:SetColor( color_white )
panel:InvalidateLayout()
end
function SKIN:LayoutVoiceNotify( panel )
panel:SetSize( 200, 40 )
panel.Avatar:SetPos( 4, 4 )
panel.Avatar:SetSize( 32, 32 )
panel.LabelName:SetPos( 44, 0 )
panel.LabelName:SizeToContents()
panel.LabelName:CenterVertical()
[/lua]
You will need to edit the panel’s color attributes at the top.