DNumSlider

From GMod Wiki

Jump to: navigation, search
Derma Control: DNumSlider
Parent Class:Panel
Subclasses:
Description:
Menu Option Line

Examples

DescriptionCreates a menu slider.
Used onNewerClient.png
Code
 
local DermaPanel = vgui.Create( "DFrame" )
DermaPanel:SetPos( 50,50 )
DermaPanel:SetSize( 200, 250 )
DermaPanel:SetTitle( "Testing Derma Stuff" )
DermaPanel:SetVisible( true )
DermaPanel:SetDraggable( true )
DermaPanel:ShowCloseButton( true )
DermaPanel:MakePopup()
 
local NumSlider = vgui.Create( "DNumSlider", DermaPanel )
NumSlider:SetPos( 25,50 )
NumSlider:SetWide( 150 )
NumSlider:SetText( "Max Props" )
NumSlider:SetMin( 0 ) -- Minimum number of the slider
NumSlider:SetMax( 256 ) -- Maximum number of the slider
NumSlider:SetDecimals( 0 ) -- Sets a decimal. Zero means it's a whole number
NumSlider:SetConVar( "sbox_maxprops" ) -- Set the convar
 
OutputDNumSlider.PNG


Methods

NewerClient.png DNumSlider.GenerateExample
NewerClient.png DNumSlider.GetDecimals
NewerClient.png DNumSlider.GetTextArea
NewerClient.png DNumSlider.GetValue
NewerClient.png DNumSlider.Init
NewerClient.png DNumSlider.OnValueChanged
NewerClient.png DNumSlider.PerformLayout
NewerClient.png DNumSlider.SetConVar
NewerClient.png DNumSlider.SetDecimals
NewerClient.png DNumSlider.SetMax
NewerClient.png DNumSlider.SetMin
NewerClient.png DNumSlider.SetMinMax
NewerClient.png DNumSlider.SetText
NewerClient.png DNumSlider.SetValue
NewerClient.png DNumSlider.TranslateSliderValues
NewerClient.png DNumSlider.ValueChanged

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox