## DuProgressBar(titleopt, containeropt)

A simple progress bar.
This was inspired by the progress bar by Marc Autret / IndiScripts.
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

View Source Duik_api_fordoc.jsxinc, line 14568

# Methods

#### # addMax(maxValueopt)

Increments the maximum value

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`maxValue` | `int` | <optional> | 1 | The value to add to the maximum

View Source Duik_api_fordoc.jsxinc, line 14750

#### # close()

Closes the progress bar

View Source Duik_api_fordoc.jsxinc, line 14771

#### # hide()

Hides the progress bar

View Source Duik_api_fordoc.jsxinc, line 14760

#### # 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

View Source Duik_api_fordoc.jsxinc, line 14724

#### # msg(message)

Changes the text of the label

##### Parameters:

Name | Type | Description
--- | --- | ---
`message` | `string` | The text

View Source Duik_api_fordoc.jsxinc, line 14669

#### # reset()

Hides and resets the progress bar to 0 and default texts

View Source Duik_api_fordoc.jsxinc, line 14712

#### # 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

View Source Duik_api_fordoc.jsxinc, line 14737

#### # 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.

View Source Duik_api_fordoc.jsxinc, line 14692

#### # stg(message)

Changes the text of the current stage

##### Parameters:

Name | Type | Description
--- | --- | ---
`message` | `string` | The text

View Source Duik_api_fordoc.jsxinc, line 14680