hello guys, i'm new on garry's mod 13 and i have a problem with the color thing :/ i mean i'm trying to set the color to a DPanel but i can't appear an error on garry's mod who can help me here is the code:
[code]
local pnlText = vgui.Create("DPanel")
pnlText:SetColor(Color(96, 96, 96, 255))
pnlText:SetParent(frmNLR)
pnlText:SetSize(470, 85)
pnlText:SetPos(10, 31)
[/code]
thanks and happy new year :)
You have to modify the drawing function.
[lua]
local pnlText = vgui.Create("DPanel")
pnlText:SetParent(frmNLR)
pnlText:SetSize(470, 85)
pnlText:SetPos(10, 31)
pnlText.Draw = function(s,w,h)
draw.RoundedBox(0,0,0,w,h,Color(96,96,96,255))
end
[/lua]
That should do it.
Sorry, you need to Log In to post a reply to this thread.