Garry's Mod Wiki

DNumSlider:SetMin

  DNumSlider:SetMin( number min )

Description

Sets the minimum value for the slider

Arguments

1 number min
The value to set as minimum for the slider.

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: