Garry's Mod Wiki

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 from DTextEntry.

Example

Create the Number Wang with the minimum number being 0 and the max being 100

local frame = vgui.Create( "DFrame" ) frame:SetSize( 300, 250 ) frame:Center() frame:MakePopup() local Wang = vgui.Create("DNumberWang", frame) Wang:SetPos(85, 25) Wang:SetSize(45, 26) Wang:SetMin(0) Wang:SetMax(100) Wang.OnValueChanged = function(self) print(self:GetValue()) end
Output:

Page Links


Special Pages


Wikis

?

Render Time: 28ms

DB GetPage 3
Generate Html 2
SaveChanges (1) 9
Render Body 0
Render Sidebar 12