Garry's Mod Wiki

DProgress

Description

A progressbar, works with a fraction between 0 and 1 where 0 is 0% and 1 is 100%.

Parent

Derives from Panel.

Methods

number DProgress:GetFraction()
Returns the progress bar's fraction. 0 is 0% and 1 is 100%.
DProgress:SetFraction( number fraction )
Sets the fraction of the progress bar. 0 is 0% and 1 is 100%.

Example

Creates a DProgress set to 75% (0.75 out of 1)

local DProgress = vgui.Create( "DProgress" ) DProgress:SetPos( 10, 30 ) DProgress:SetSize( 200, 20 ) DProgress:SetFraction( 0.75 )
Output:

Page Links


Special Pages


Wikis

?

Render Time: 117ms

DB GetPage 19
Generate Html 3
SaveChanges (1) 81
Render Body 0
Render Sidebar 12