DNumSlider/SetMin

From Garry's Mod
Jump to: navigation, search
 DNumSlider:SetMin( )

Contents

DescriptionPanelFunc

Sets the minimum value for the slider

Arguments

number min

The value to set as minimum for the slider.

Examples

Example

An example usage of the function

--This creates the frame.
local Frame = vgui.Create( "DFrame" )
Frame :Center() -- or Frame:SetPos( x, y )
Frame:SetSize( 300, 150 )
Frame:SetTitle( "Test" )
Frame:SetVisible( true )
Frame:SetDraggable( true )
Frame:ShowCloseButton( true )
Frame:MakePopup()
--Here we create the slider.
local DermaSlider = vgui.Create( "DNumSlider", Frame )
DermaSlider:SetPos( 25, 85 )
DermaSlider:SetWide( 275 )
DermaSlider:SetMin( 0 ) -- Or 3 for second image
DermaSlider:SetMax( 5 )
DermaSlider:SetValue( 0.5 )
DermaSlider:SetDecimals( 2 )

Output:


DermaSlider Test.jpeg

DermaSlider min 3.jpeg
Personal tools
Navigation