- Added comprehensive state management with conditional states, priority-based resolution, and property overrides

- Added responsive.lua with fluent builder API (:when()/:apply()/:otherwise()) for creating responsive layouts that react to parent size or custom conditions
- All elements now use getResolved() to check active states, enabling multiple responsive rules to coexist
This commit is contained in:
Robert Jelic
2025-11-04 22:40:37 +01:00
parent 083a3b0b7b
commit 2ca7ad1e4c
37 changed files with 1050 additions and 740 deletions

View File

@@ -44,7 +44,7 @@ end
function Timer:start()
if not self.running then
self.running = true
local time = self.get("interval")
local time = self.getResolved("interval")
self.timerId = os.startTimer(time)
end
return self
@@ -70,12 +70,12 @@ function Timer:dispatchEvent(event, ...)
local timerId = select(1, ...)
if timerId == self.timerId then
self.action()
local amount = self.get("amount")
local amount = self.getResolved("amount")
if amount > 0 then
self.set("amount", amount - 1)
end
if amount ~= 0 then
self.timerId = os.startTimer(self.get("interval"))
self.timerId = os.startTimer(self.getResolved("interval"))
end
end
end