Garry's Mod Wiki

DNumberWang:SetDecimals

  DNumberWang:SetDecimals( number num )

Description

Sets the amount of decimal places allowed in the number selector.

Arguments

1 number num
The amount of decimal places.

Example

Sets the number selector to 3 decimal places and sets the value to a random number between 0 and 1.

local numinput = vgui.Create("DNumberWang") numinput:SetPos(5, 5) numinput:SetSize(90, 20) numinput:SetDecimals(3) numinput:SetValue(math.random())
Output: