Fixed animation

Fixed eventsystem not registering its parent events
This commit is contained in:
Robert Jelic
2025-04-14 02:39:54 +02:00
parent bd62debc32
commit b91031afbc
28 changed files with 30 additions and 4 deletions

View File

@@ -265,6 +265,7 @@ function Animation:event(event, timerId)
if #remaining > 0 then
self.timer = os.startTimer(0.05)
end
return true
end
end
@@ -416,13 +417,12 @@ Animation.registerAnimation("scrollText", {
local VisualElement = {hooks={}}
---@private
function VisualElement.hooks.dispatchEvent(self, event, ...)
function VisualElement.hooks.handleEvent(self, event, ...)
if event == "timer" then
local animation = self.get("animation")
if animation then
animation:event(event, ...)
end
return true
end
end