Skip to content

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

Released under the MIT License.