• Need help customizing CheckBoxes
    2 replies, posted
Can someone give me an example of how to pain a DChecBoxLabel? I've joined servers with nice checkboxes but I looked all over google, and the wiki(s) and I couldn't find anything on how to simply edit the look of a DChecBoxLabel. Incredibly annoying when the wikis don't go much into detail with certain things.
local frame = vgui.Create( "DFrame" ) frame:SetSize( 500, 500 ) frame:Center() frame:MakePopup() local box = vgui.Create( "DCheckBoxLabel", frame ) box:Dock( TOP ) function box.Button:Paint( w, h ) if self:GetChecked() then surface.SetDrawColor( 0, 255, 0 ) surface.DrawRect( 0, 0, w, h ) else surface.SetDrawColor( 255, 255, 255 ) surface.DrawRect( 0, 0, w, h ) end end
Thanks a bunch!
Sorry, you need to Log In to post a reply to this thread.