Hi guys. I make a derma and use sheets. And I would like to change button - make it custom. How can I do this?
selfie.columnsheet = vgui.Create("DColumnSheet",selfie.mainpanel)
selfie.columnsheet:Dock(FILL)
selfie.columnsheet.Paint = function (self,w,h)
surface.SetDrawColor(75,76,89,50)
surface.DrawRect(0,0,w,h)
end
selfie.csheet1 = vgui.Create("DPanel",selfie.columnsheet)
selfie.csheet1:Dock(FILL)
selfie.csheet1.Paint = function(self,w,h)
draw.RoundedBox(0,0,0,w,h,Color(54,54,67,255))
end
selfie.columnsheet:AddSheet("Text Settings",selfie.csheet1,nil)
https://files.facepunch.com/forum/upload/114477/69431b44-fb0b-4784-aa44-81e2b4c3572b/изображение.png
Instead of using AddSheet, just create a button in the same way you created everything else:
selfie.button = vgui.Create("DButton",selfie.csheet1)
Then you can override its Paint function in the same way you did for the other elements.
Sorry, you need to Log In to post a reply to this thread.