Progress
Display progress bars and circular progress indicators.
Exports
| Export | Parameters | Returns |
|---|---|---|
ProgressBar | (data) | boolean — true if completed, false if cancelled |
ProgressCircle | (data) | boolean — true if completed, false if cancelled |
ProgressActive | () | boolean |
CancelProgress | () | — |
ProgressBar Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
duration | number | Yes | Duration in milliseconds |
label | string | Yes | Text displayed on the progress bar |
useWhileDead | boolean | No | Allow while player is dead |
canCancel | boolean | No | Allow cancellation with the cancel key |
Usage
Progress Bar
local completed = exports['flux-ui-pack']:ProgressBar({
duration = 5000,
label = 'Loading...',
useWhileDead = false,
canCancel = true
})
if completed then
print('Progress completed!')
else
print('Progress cancelled')
endProgress Circle
local completed = exports['flux-ui-pack']:ProgressCircle({
duration = 3000,
label = 'Processing...',
canCancel = false
})Check if Active
if exports['flux-ui-pack']:ProgressActive() then
print('A progress indicator is running')
endCancel Progress
exports['flux-ui-pack']:CancelProgress()Last updated on