CBA_fnc_progressBar

Description

Opens a progress bar.  Closes the currently active progress bar.

Parameters

_titleTitle of the progress bar STRING
_totalTimeTime for the progress bar to complete <NUMBER>
_conditionExecute every frame.  If reports false, close the progress bar <CODE>
_onSuccessScript to execute if the progress bar completed <CODE>
_onFailureScript to execute if the progress bar was aborted prematurely (optional, default: {}) <CODE>
_argumentsArguments passed to the scripts (optional, default: []) <ANY>
_blockMouseBlock mouse input (optional, default: true) <BOOLEAN>
_blockKeysBlock keyboard input requires _blockMouse to be set to true (optional, default: true) <BOOLEAN>
_allowCloseAllow ESC key to abort the progress bar requires _blockMouse to be set to true (optional, default: true) <BOOLEAN>

Arguments

_this: #0 - same as _arguments <ANY> #1 - true: success, false: failure <BOOLEAN> #2 - elapsed time, not more than _totalTime <NUMBER> #3 - total time, same as _totalTime <NUMBER> #4 - failure code <NUMBER> 0 - no failure 1 - user hit ESC key 2 - condition was false 3 - progressbar closed by new progressbar

Returns

Nothing

Examples

["progress bar", 5, {true}, {hint "done"}, {hint "aborted"}] call CBA_fnc_progressBar;

Author

commy2

string used by format
Close