This commit is contained in:
NoryiE
2025-10-29 16:56:08 +00:00
parent 9a5b46138e
commit 00a9ce5632
26 changed files with 812 additions and 77 deletions

View File

@@ -74,7 +74,7 @@ Registers a new animation type
* `handlers` `table` Table containing start, update and complete handlers
### Usage
```lua
```lua run
Animation.registerAnimation("fade", {start=function(anim) end, update=function(anim,progress) end})
```

View File

@@ -42,7 +42,7 @@ Enables benchmarking for a method
* `BaseElement` `self` The element instance
### Usage
```lua
```lua run
element:benchmark("render")
```
@@ -99,7 +99,7 @@ Enables benchmarking for a container and all its children
* `Container` `self` The container instance
### Usage
```lua
```lua run
container:benchmarkContainer("render")
```

View File

@@ -1,3 +1,20 @@
# Reactive
_This module provides reactive functionality for elements, it adds no new functionality for elements. _
_It is used to evaluate expressions in property values and update the element when the expression changes._
## Usage
```lua run
local button = main:addButton({text="Exit"})
```
```lua run
button:setX("{parent.x - 12}")
```
```lua run
button:setBackground("{self.clicked and colors.red or colors.green}")
```
```lua run
button:setWidth("{#self.text + 2}")
```