Cursor Fix

This commit is contained in:
Robert Jelic
2025-02-25 23:28:53 +01:00
parent 9d5e6d4aa3
commit 5fdf01bcfe
5 changed files with 42 additions and 41 deletions

View File

@@ -337,7 +337,7 @@ end
--- @param event string The event to call
--- @vararg any The event arguments
--- @return boolean handled Whether the event was handled
--- @return table child? The child that handled the event
--- @return table? child The child that handled the event
function Container:callChildrenEvent(visibleOnly, event, ...)
local children = visibleOnly and self.get("visibleChildrenEvents") or self.get("childrenEvents")
if children[event] then
@@ -349,6 +349,15 @@ function Container:callChildrenEvent(visibleOnly, event, ...)
end
end
end
if(children["*"])then
local events = children["*"]
for i = #events, 1, -1 do
local child = events[i]
if(child:dispatchEvent(event, ...))then
return true, child
end
end
end
return false
end