So hey I am having a problem with the GMod panels.
I am trying to set the design and the text color of a DButton and i am currently using this:
local DermaButton = vgui.Create( "DButton", SelectionPanel )
DermaButton:SetText("")
DermaButton:SetPos( 25, 50 )
DermaButton:SetSize( 250, 30 )
DermaButton.DoClick = function()
RunConsoleCommand( "say", "Hi" )
end
function DermaButton:Paint( w, h)
draw.RoundedBox( 0, 0, 0, w, h, Color( 255, 0, 0, 255 ) )
draw.Text( {
text = "Fighter",
color = Color(255,255,255,255),
pos = { w/2, h/2 },
font = "Gamemode_selection",
yalign = TEXT_ALIGN_CENTER,
xalign = TEXT_ALIGN_CENTER,
})
end
but I think there is an other way I don't see. Can someone gives me an example on how to set the text color of a button?
Thanks for reading,
~Cap