DNumSlider.SetDecimals

From GMod Wiki

Jump to: navigation, search
Function
Syntax DNumSlider:SetDecimals( integer )
Description:
Sets the number of decimal places that a DNumSliderwill use
Returns: nil
In Object: DNumSlider
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DNumSlider.SetDecimals]DNumSlider.SetDecimals [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionSets the number of decimal places that a DNumSlider will use to 0, 1, and 3
Used onNewerClient.png
Code
 
NumSlider:SetDecimals(0)
NumSlider:SetDecimals(1)
NumSlider:SetDecimals(3)
 
OutputThe first one will cause the DNW to use no decimals places. Example value would be '4'.

Second example will cause the DNW to use 1 decimal place. Example value would be '4.2'.

Third example will cause the DNW to use 3 decimal places. Example value would be '4.343'.
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox