Table of Contents

Class ProgressBar

Namespace
OmegaGUI.Render
Assembly
OmegaGUI.dll

A bar that displays a value within a range, e.g. a health bar

public class ProgressBar : Control
Inheritance
object
ProgressBar
Inherited Members

Remarks

This control is purely informative; it does not handle any user input.

Constructors

ProgressBar(Dialog)

Create new progress bar instance

public ProgressBar(Dialog parent)

Parameters

parent Dialog

Fields

BackgroundLayer

public const int BackgroundLayer = 0

Field Value

int

FillColor

The color of the bar when Value is at Max

public Color4 FillColor

Field Value

Color4

FillColorLow

The color of the bar when Value is at Min; transparent to always use FillColor

public Color4 FillColorLow

Field Value

Color4

FillLayer

public const int FillLayer = 1

Field Value

int

Reversed

Fill the bar from right to left instead of from left to right

public bool Reversed

Field Value

bool

Properties

Fraction

How much of the bar is filled, between 0 and 1

public float Fraction { get; }

Property Value

float

Max

The upper end of the range displayed by the bar

public float Max { get; set; }

Property Value

float

Min

The lower end of the range displayed by the bar

public float Min { get; set; }

Property Value

float

Value

The current value of the bar; values outside of Min and Max are clamped for display

public float Value { get; set; }

Property Value

float

Methods

Render(Device, float)

Render the progress bar

public override void Render(Device device, float elapsedTime)

Parameters

device Device
elapsedTime float