Garry's Mod Wiki

Garry's Mod Wiki

Description

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

View source

Parent

Derives methods, etc not listed on this page 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:

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 twice a day. Edits and history are not available.

Last Parsed: Loading...