• Paint functions on DNumSlider
    0 replies, posted
Hi I'm trying to make a custom painted DNumSlider but I'm stuck as to how to change certain parts of it. The knob for now is just a box but that'll be replaced, and the label has it's color changed too. What I was wondering is how to edit the actual DSlider itself to change the color behind it and the text on it, seeing as right now just using the second paint function in the code below just draws a box over it all which it's that appealing. Cheers [CODE] object.Label:SetColor(Color(255,255,255,255)) object.Slider.Knob.Paint = function( self, w, h ) surface.SetDrawColor( 80, 80, 80, 255 ) surface.DrawRect( 0, 0, self:GetWide(), self:GetTall() ) end object.Slider.Paint = function( self, w, h ) surface.SetDrawColor( 255,255,255,100 ) surface.DrawRect( 0, 0, self:GetWide(), self:GetTall() ) end [/CODE]
Sorry, you need to Log In to post a reply to this thread.