Class ProgressBar
- Namespace
- UILib.Components
- Assembly
- UILib.dll
A simple progress bar. Provides a simple visual representation of progress.
public class ProgressBar : UIComponent
- Inheritance
-
ProgressBar
- Inherited Members
Constructors
ProgressBar(bool)
Initializes the progress bar.
public ProgressBar(bool vertical = false)
Parameters
verticalboolWhether this progress bar should be vertical
Properties
background
The background for this progress bar.
public Image background { get; }
Property Value
fill
The fill for this progress bar.
public Image fill { get; }
Property Value
progress
The current amount of progress (between 0 and 1).
public float progress { get; }
Property Value
vertical
Whether this progress bar is vertical.
public bool vertical { get; }
Property Value
Methods
SetProgress(float)
Sets the progress of this progress bar. This must be between 0 and 1.
public void SetProgress(float progress)
Parameters
progressfloatThe value to set the progress to
SetThisTheme(Theme)
Allows setting the theme of this progress bar.
This handles setting the theme specifically for this component, not its children. It's protected to allow overriding if you were to create a subclass.
In most cases, you'd probably want to use SetTheme(Theme) instead.
protected override void SetThisTheme(Theme theme)
Parameters
themeThemeThe theme to apply
SetVertical(bool)
Sets whether this progress bar is vertical.
Passing true means it will become vertical (bottom to top).
Passing false means it will become horizontal (left to right).
This will also immediately update the progress bar's visuals.
public void SetVertical(bool vertical)
Parameters
verticalboolWhether this progress bar is vertical