Progressbar
Progressbar Functions
startProgressbar(data, callback)
startProgressbar(data, callback)
Starts a progress bar and returns a completion status.
Parameters:
data.icon
(string) The FontAwesome icon to display.data.label
(string) The text to display on the progress bar.data.time
(number) The duration of the progress bar in seconds.data.animation
(table) Animation configuration:data.animation.dict
(string): The animation dictionary.data.animation.name
(string): The animation name.
data.inputBlock
(table) Input blocking configuration:data.inputBlock.keys
(table): A list of keys to block.
data.cancelable
(boolean) Specifies whether the progress bar can be canceled by pressingX
(default istrue
).callback
(function) A callback function that returns:true
if the progress bar completed successfully,false
if it was canceled.
cancelProgressbar()
cancelProgressbar()
Cancels the active progress bar and stops any associated animation.
Exports
This module exports two functions for use in other scripts:
exports["script_name"]:startProgressbar(data, function(isDone) ... end)
exports["script_name"]:cancelProgressbar()
Usage Example
Last updated