mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
docs upd
This commit is contained in:
parent
d04fb4f886
commit
d74b6ca91c
4 changed files with 72 additions and 0 deletions
|
|
@ -231,6 +231,22 @@ Properties:
|
|||
| value | string | yes | yes | Selected value |
|
||||
| options | table | yes | yes | List of options (tables `{value=..., text=...}`) |
|
||||
|
||||
## Progress bar (progressbar)
|
||||
|
||||
Properties:
|
||||
|
||||
| Name | Type | Read | Write | Description |
|
||||
|------------|--------|------|-------|---------------------------------------------------------------|
|
||||
| value | float | yes | yes | current value |
|
||||
| min | float | yes | yes | minimum value |
|
||||
| max | float | yes | yes | maximum value |
|
||||
| progress | float | yes | no | progress 0..1 |
|
||||
| barColor | rgba | yes | yes | color of the filled part |
|
||||
| bgColor | rgba | yes | yes | background color (empty part) |
|
||||
| textColor | rgba | yes | yes | text color |
|
||||
| textFormat | string | yes | yes | text format (sprintf: `%1$` — raw value, `%2$` — percent 0–100) |
|
||||
| smooth | bool | yes | yes | smooth value change |
|
||||
|
||||
## Inventory
|
||||
|
||||
Properties:
|
||||
|
|
|
|||
|
|
@ -193,6 +193,26 @@ Example of list description:
|
|||
- `selected` - initially selected value. Default: "".
|
||||
- `onselect` - function to which the user-selected value is passed
|
||||
|
||||
## Progress bar - *progressbar*
|
||||
|
||||
Non-interactive element for displaying progress. Draws a background and a filled part.
|
||||
|
||||
- `min` - minimal value. Type: number. Default: 0
|
||||
- `max` - maximal value. Type: number. Default: 100
|
||||
- `value` - initial value. Type: number. Default: 0
|
||||
- `bar-color` - color of the filled part. Type: RGBA color. Default: blue `#3399FFCC`
|
||||
- `bg-color` - background color (empty part). Type: RGBA color. Default: semi-transparent black `#00000066`
|
||||
- `orientation` - fill direction: `horizontal` / `vertical`
|
||||
- `supplier` - Lua function - value supplier, called every frame
|
||||
- `smooth` - smooth value change on updates. Type: boolean. Default: false
|
||||
- `text-format` - format of the text centered in the bar (sprintf, two arguments: `%1$` - raw value, `%2$` - percent 0-100)
|
||||
```xml
|
||||
<progressbar value='35' min='10' max='50' text-format='%.0f%%'/> <!-- "62%" -->
|
||||
<progressbar value='35' min='10' max='50' text-format='%.0f (%.0f%%)'/> <!-- "35 (62%)" -->
|
||||
<progressbar value='35' min='10' max='50' text-format='%2$.0f%%'/> <!-- "62%" -->
|
||||
```
|
||||
- `text-color` - text color. Type: RGBA color. Default: white `#FFFFFFFF`
|
||||
|
||||
## *bindbox*
|
||||
|
||||
An element for displaying and editing key or mouse button bindings.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue