mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 23:11:49 +00:00
Add canvas UI node
This commit is contained in:
parent
cb960ceaad
commit
ee31f401aa
12 changed files with 279 additions and 2 deletions
|
|
@ -156,6 +156,25 @@ Properties:
|
|||
| ----- | ------ | ---- | ----- | ------------ |
|
||||
| src | string | yes | yes | texture name |
|
||||
|
||||
## Canvas
|
||||
|
||||
Properties:
|
||||
|
||||
| Title | Type | Read | Write | Description |
|
||||
|-------|--------| ---- |-------|-------------|
|
||||
| data | Canvas | yes | no | canvas data |
|
||||
|
||||
Methods:
|
||||
|
||||
| Method | Description |
|
||||
|----------------------------------------------------------|---------------------------------------------------------|
|
||||
| data:at(x: int, y: int) | returns an RGBA pixel at the given coordinates |
|
||||
| data:set(x: int, y: int, rgba: int) | updates an RGBA pixel at the given coordinates |
|
||||
| data:set(x: int, y: int, r: int, g: int, b: int) | updates an RGBA pixel at the given coordinates |
|
||||
| data:set(x: int, y: int, r: int, g: int, b: int, a: int) | updates an RGBA pixel at the given coordinates |
|
||||
| data:update() | applies changes to the canvas and uploads it to the GPU |
|
||||
|
||||
|
||||
## Inventory
|
||||
|
||||
Properties:
|
||||
|
|
|
|||
|
|
@ -97,7 +97,11 @@ Inner text is a button text.
|
|||
- `src` - name of an image stored in textures folder. Extension is not specified. Type: string.
|
||||
Example: *gui/error*
|
||||
|
||||
## *textbox*
|
||||
## *canvas*
|
||||
|
||||
- _No additional attributes_
|
||||
|
||||
## *textbox*
|
||||
|
||||
Inner text - initially entered text
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue