This commit is contained in:
NoryiE
2025-04-06 04:52:12 +00:00
parent 4dd6bbac7f
commit b3b1cb4e48
5 changed files with 18 additions and 7 deletions

View File

@@ -2,5 +2,14 @@
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
local button = main:addButton({text="Exit"})
button:setX("{parent.x - 12}")
button:setBackground("{self.clicked and colors.red or colors.green}")
button:setWidth("{self.text:len() + 2}")
```