deploy: 167fc8ef81
This commit is contained in:
@@ -74,7 +74,7 @@ Registers a new animation type
|
||||
* `handlers` `table` Table containing start, update and complete handlers
|
||||
|
||||
### Usage
|
||||
```lua run
|
||||
```lua
|
||||
Animation.registerAnimation("fade", {start=function(anim) end, update=function(anim,progress) end})
|
||||
```
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ Enables benchmarking for a method
|
||||
* `BaseElement` `self` The element instance
|
||||
|
||||
### Usage
|
||||
```lua run
|
||||
```lua
|
||||
element:benchmark("render")
|
||||
```
|
||||
|
||||
@@ -99,7 +99,7 @@ Enables benchmarking for a container and all its children
|
||||
* `Container` `self` The container instance
|
||||
|
||||
### Usage
|
||||
```lua run
|
||||
```lua
|
||||
container:benchmarkContainer("render")
|
||||
```
|
||||
|
||||
|
||||
@@ -3,18 +3,18 @@ _This module provides reactive functionality for elements, it adds no new functi
|
||||
_It is used to evaluate expressions in property values and update the element when the expression changes._
|
||||
|
||||
## Usage
|
||||
```lua run
|
||||
```lua
|
||||
local button = main:addButton({text="Exit"})
|
||||
```
|
||||
|
||||
```lua run
|
||||
```lua
|
||||
button:setX("{parent.x - 12}")
|
||||
```
|
||||
|
||||
```lua run
|
||||
```lua
|
||||
button:setBackground("{self.clicked and colors.red or colors.green}")
|
||||
```
|
||||
|
||||
```lua run
|
||||
```lua
|
||||
button:setWidth("{#self.text + 2}")
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user