Is there a way to re-design the dnumslider to look differently from the default look?
[QUOTE=BCBEST;48887656]Is there a way to re-design the dnumslider to look differently from the default look?[/QUOTE]
I don't know anything about Derma Skins, but you can always Paint each individual element of it.
Take a look at the Garry's mod Lua GitHub. Search for dnumslider or whatever and take a look at the source code. You will (hopefully) find variables you can paint or manipulate.
Depending on what part you want to paint, the PANEL:Init() function got various parts(text entry, slider label & scratch[?]).
[code]
self.TextArea = self:Add( "DTextEntry" )
self.Slider = self:Add( "DSlider", self )
self.Label = vgui.Create ( "DLabel", self )
self.Scratch = self.Label:Add( "DNumberScratch" )
[/code]
So you basically, if you want to paint the slider as example, get the slider by using:
[code]
function DNumSlider.Slider:Paint(w, h)
end
[/code]
And paint it. For how to paint it, look inside the specific files in the /lua/vgui/ files which are:
* [B]dnumslider.lua[/B] - The whole element itself
* [B]dnumberscratch.lua[/B] - Scratch(?)
* [B]dslider.lua[/B] - The slider
* [B]dtextentry.lua[/B] - The text entry for the number
* [B]dlabel.lua[/B] - The label
I hope that helps! c:
[URL="https://facepunch.com/showthread.php?t=1468276"]Except that I tried to repaint the notches and it didn't work and my thread never got a reply so I closed it, so good luck[/URL]
[QUOTE=MPan1;48898633][URL="https://facepunch.com/showthread.php?t=1468276"]Except that I tried to repaint the notches and it didn't work and my thread never got a reply so I closed it, so good luck[/URL][/QUOTE]
I think thats a bit too complicated for him, he should try it slow first :p
Sorry, you need to Log In to post a reply to this thread.