Garry's Mod Wiki

Garry's Mod Wiki

  DNumberWang:SetFraction( number val )

Description

Sets the value of the number selector based on the given fraction number.

Arguments

1 number val
The fraction of the number selector's range.

Example

Sets and prints out the value of a quarter, half, and three-fourths of the number selector range.

local numinput = vgui.Create("DNumberWang") numinput:SetPos(5, 5) numinput:SetSize(90, 20) numinput:SetMinMax(0, 500) numinput:SetFraction(0.25) print(numinput:GetValue()) numinput:SetFraction(0.5) print(numinput:GetValue()) numinput:SetFraction(0.75) print(numinput:GetValue())
Output:
125 250 375

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...