Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/itzkiwisky/progressutilities-lua
created with learning purposes, feel free to use on your projects =3
https://github.com/itzkiwisky/progressutilities-lua
lua terminal
Last synced: 15 days ago
JSON representation
created with learning purposes, feel free to use on your projects =3
- Host: GitHub
- URL: https://github.com/itzkiwisky/progressutilities-lua
- Owner: itzKiwiSky
- Created: 2021-07-10T01:04:41.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-07-29T20:03:58.000Z (over 3 years ago)
- Last Synced: 2024-11-08T18:12:46.607Z (2 months ago)
- Topics: lua, terminal
- Language: Lua
- Homepage:
- Size: 30.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ProgressUtilities-Lua
Created just for learning purposes, but feel free to use in your projects, change the code and redistribute.
any mention or credit is highly appreciated =3# Simple Documentation
Some functions will be explained here:
# progress.Create
Use: ```progress.Create(wait-time)```
This function start the progress counter on your project.
It only require **one** input, this input is the wait time or wait seconds**Example**:
```progress.Create(1)```Every **1** second(s) this will add a value to progress.
# progress.Edit
Use: ```progress.Edit(ValueName, Value)```
This function is used to edit some values you want, to create your progress.
**Example**:
```progress.Edit(AddValue, 4)```
On function ```progress.Create()``` it will add 4 to value every time.
**Example2**:
```lua
progress.AddValue(5) -- edit value "AddValue"
progress.WaitTime(0.1) -- edit value "WaitTime"
progress.Create(0) -- Create the progress
```
You can create a simple function to help with this setup**Example 3**:
``` lua
function setup()
progress.AddValue(5)
progress.WaitTime(0.1)
progress.MaxValue(100)
progress.Message("Loading Content.")
progress.Style(4)
end
```**Output**:
```
====================================
Loading your content (45%)
====================================
```These function are made to edit the progress content:
```lua
progress.AddValue() -- This function add to counter
progress.WaitTime() -- This function is a sleep function to wait.
progress.MaxValue() -- Set the maximum value, and if the counter reach this value it will be stopped
progress.Message() -- Set your custom loading message
progress.Style() -- Select the style, for now available [0, 1, 2, 3]
```# Debug functions (Optional)
````lua
progress.ForceDraw() -- This function force draw the loading style
progress.ValueTable() -- This function will only show the variables
````