DNumberWang
Description
DNumberWang is a VGUI element that allows you to input a numeric value using up and down arrows or direct entry.
Parent
Derives methods, etc not listed on this page from DTextEntry.
Events
DNumberWang:OnValueChanged( number val )
Called when the number selector value is changed.
Methods
number DNumberWang:GetDecimals()
Returns the amount of decimal places allowed in the number selector, set by DNumberWang:SetDecimals
number DNumberWang:GetFloatValue()
We advise against using this. It may be changed or removed in a future update.
Returns whatever is set by DNumberWang:SetFloatValue or 0.
DNumberWang:GetFraction( number val )
Returns a fraction representing the current number selector value to number selector min/max range ratio. If argument val is supplied, that number will be computed instead.
number DNumberWang:GetInterval()
Returns interval at which the up and down buttons change the current value.
Panel DNumberWang:GetTextArea()
We advise against using this. It may be changed or removed in a future update.
This function returns the panel it is used on.
DNumberWang:HideWang()
Hides the number selector arrows.
DNumberWang:SetDecimals( number num )
Sets the amount of decimal places allowed in the number selector.
DNumberWang:SetFloatValue( number val )
We advise against using this. It may be changed or removed in a future update.
Appears to do nothing.
DNumberWang:SetFraction( number val )
Sets the value of the number selector based on the given fraction number.
DNumberWang:SetInterval( number min )
Sets interval at which the up and down buttons change the current value.
Sets the minimum and maximum value allowed by the number selector.
Example
Create the Number Wang with the minimum number being 0 and the max being 100
Output: