From 9e18b67a640faa3420cf0469d5e7fd0ba5d538a4 Mon Sep 17 00:00:00 2001 From: Michael Freno Date: Tue, 11 Nov 2025 13:17:45 -0500 Subject: [PATCH] fix non-code references --- FlexLove.lua | 2 +- modules/Element.lua | 6 +++--- themes/README.md | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/FlexLove.lua b/FlexLove.lua index f590cca..b8882f0 100644 --- a/FlexLove.lua +++ b/FlexLove.lua @@ -444,7 +444,7 @@ function Gui.getElementAtPosition(x, y) local topBlocker = blockingElements[1] -- If the top blocker has higher z-index than the top candidate, -- and the blocker is NOT an ancestor of the candidate, - -- return the blocker (even though it has no callback, it blocks input) + -- return the blocker (even though it has no onEvent, it blocks input) if topBlocker.z > topCandidate.z and not isAncestor(topBlocker, topCandidate) then return topBlocker end diff --git a/modules/Element.lua b/modules/Element.lua index f515fec..012c67b 100644 --- a/modules/Element.lua +++ b/modules/Element.lua @@ -2502,7 +2502,7 @@ function Element:destroy() -- Clear animation reference self.animation = nil - -- Clear callback to prevent closure leaks + -- Clear onEvent to prevent closure leaks self.onEvent = nil end @@ -3154,7 +3154,7 @@ function Element:update(dt) end end - -- Handle scrollbar click/press (independent of callback) + -- Handle scrollbar click/press (independent of onEvent) -- Check if we should handle scrollbar press for elements with overflow local overflowX = self.overflowX or self.overflow local overflowY = self.overflowY or self.overflow @@ -3293,7 +3293,7 @@ function Element:update(dt) if not self._pressed[button] then -- Check if press is on scrollbar first (skip if already handled) if button == 1 and not self._scrollbarPressHandled and self:_handleScrollbarPress(mx, my, button) then - -- Scrollbar consumed the event, mark as pressed to prevent callback + -- Scrollbar consumed the event, mark as pressed to prevent onEvent self._pressed[button] = true self._scrollbarPressHandled = true else diff --git a/themes/README.md b/themes/README.md index 59c637f..53d23a7 100644 --- a/themes/README.md +++ b/themes/README.md @@ -186,7 +186,7 @@ local button = Gui.new({ textColor = Color.new(1, 1, 1, 1), backgroundColor = Color.new(0.2, 0.4, 0.8, 0.3), -- Shows behind theme themeComponent = "button", -- Uses button component from active theme - callback = function(element, event) + onEvent = function(element, event) if event.type == "click" then print("Clicked!") end