This commit is contained in:
NoryiE
2025-09-13 20:28:52 +00:00
parent 9e1112f3bd
commit 4ccefcac9f
48 changed files with 3036 additions and 1565 deletions

View File

@@ -1,30 +1,39 @@
# ProgressBar : VisualElement
This is the progress bar class. It provides a visual representation of progress
with optional percentage display and customizable colors.
### Usage
```lua
local progressBar = main:addProgressBar()
progressBar:setDirection("up")
progressBar:setProgress(50)
```
# ProgressBar
_This is the progress bar class. It provides a visual representation of progress
with optional percentage display and customizable colors._
Extends: `VisualElement`
## Properties
|Property|Type|Default|Description|
|---|---|---|---|
|progress|number|0|Current progress value (0-100)
|showPercentage|boolean|false|Whether to show the percentage text in the center
|progressColor|color|lime|The color used for the filled portion of the progress bar
|direction|string|right|The direction of the progress bar ("up", "down", "left", "right")
|progress|number|0|Current progress value (0-100)|
|showPercentage|boolean|false|Whether to show the percentage text in the center|
|progressColor|color|lime|The color used for the filled portion of the progress bar|
|direction|string|right|The direction of the progress bar ("up", "down", "left", "right")|
## Protected Functions
## Functions
|Method|Returns|Description|
|---|---|---|
|ProgressBar:init|ProgressBar|Initializes the ProgressBar instance
|ProgressBar:render|-|Renders the progress bar with filled portion and optional percentage text
|[ProgressBar.new](#progressbar-new)|ProgressBar|Creates a new ProgressBar instance|
|[ProgressBar:init](#progressbar-init-props-basalt)|ProgressBar|Initializes the ProgressBar instance|
|[ProgressBar:render](#progressbar-render)|-|Renders the progress bar with filled portion and optional percentage text|
## ProgressBar.new()
Creates a new ProgressBar instance
### Returns
* `ProgressBar` `self` The newly created ProgressBar instance
## ProgressBar:init(props, basalt)
### Parameters
* `props` `table` The properties to initialize the element with
* `basalt` `table` The basalt instance
### Returns
* `ProgressBar` `self` The initialized instance
## ProgressBar:render()