Constructor
# new DuProgressBar(titleopt, containeropt)
Constructs a progress bar popup
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
title |
string
|
<optional> |
"Magic is happening" | The title of the progress bar |
container |
Group
|
<optional> |
A ScriptUI Group to add the progress bar. If not provided, the bar will be added in a new window popup |
Methods
# addMax(maxValueopt)
Increments the maximum value
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
maxValue |
int
|
<optional> |
1 | The value to add to the maximum |
# hit(valueopt, messageopt)
Updates and increments the progress bar
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
value |
int
|
<optional> |
The new value. if omitted, the bar is just incremented by 1 |
message |
string
|
<optional> |
A new label |
# msg(message)
Changes the text of the label
Parameters:
Name | Type | Description |
---|---|---|
message |
string
|
The text |
# reset()
Hides and resets the progress bar to 0 and default texts
# setMax(maxValue, onlyIfZeroopt)
Sets the maximum value
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
maxValue |
int
|
The new maximum value | ||
onlyIfZero |
Boolean
|
<optional> |
true | Set to false to change the max value even if it was not 0 before |
# show(messageopt, eventCoordinatesopt)
Shows the progress bar and updates the value and text
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
message |
string
|
<optional> |
'' | The text |
eventCoordinates |
Array.<int>
|
<optional> |
Provide the screen coordinates to center the progress bar on the corresponding screen. |
# stg(message)
Changes the text of the current stage
Parameters:
Name | Type | Description |
---|---|---|
message |
string
|
The text |