• Saving dnumslider value?
    0 replies, posted
I'm trying to save the value from the slider so the next time I open the DERMA window it will remember what I put in the last time. How do I do this? I've tried several things and it currently looks like this: [lua] NumSlider = vgui.Create( "DNumSlider", DermaPanel ) NumSlider:SetPos( 25,50 ) NumSlider:SetWide( 150 ) NumSlider:SetText( "Volume:" ) NumSlider:GetValue() NumSlider:SetMin( 0 ) -- Minimum number of the slider NumSlider:SetMax( 100 ) -- Maximum number of the slider NumSlider:SetDecimals( 0 ) -- Sets a decimal. Zero means it's a whole number NumSlider:SetConVar( "lbc_volume" ) -- Set the convar NumSlider.ValueChanged = function(pSelf, fValue) print(fValue) volym1 = fValue end NumSlider:SetValue(volym1) end [/lua] [editline]10:03PM[/editline] No one knows? :(
Sorry, you need to Log In to post a reply to this thread.