Displays a progress bar.
// Construct a new Progressbar with a value range of [0, 200].
var myProgressbar = new Progressbar(0, 200);
// Display the percentage of progress
myProgressbar.label = "Progress: ::percentage::%"
// Set the value to 36, which is 18% of the value range
myProgressbar.value = 36;
Constructor
new(minValue:FastFloat = 0.0, maxValue:FastFloat = 1.0)
Create a new Progressbar
with the given value range.
Variables
precision:Int = 0
The amount of decimal places of the value of this progress bar. Used only
for displaying the label. The value itself is not changed by this
variable. If you need to change the value to this precision, use
MathUtil.roundPrecision()
.
See also:
text:String = ""
The label of this progress bar.
Tip: Use Haxe's template system with
::value::
,::progress::
,::percentage::
(progress * 100 as integer value),::minValue::
or::maxValue::
! Other template variables are not supported.
myProgressbar.label = "Progress: ::percentage::%";
See also: