This commit is contained in:
2026-04-03 11:33:51 +02:00
parent 64922e1ae3
commit 0ed904319d
57 changed files with 2935 additions and 1377 deletions
+5 -5
View File
@@ -48,14 +48,14 @@ function Elements:update_proximities()
element:update_proximity()
end
if element.proximity_raw == 0 then
if element.proximity_raw <= 0 then
-- Mouse entered element area
if previous_proximity_raw ~= 0 then
if previous_proximity_raw > 0 then
mouse_enter_elements[#mouse_enter_elements + 1] = element
end
else
-- Mouse left element area
if previous_proximity_raw == 0 then
if previous_proximity_raw <= 0 then
mouse_leave_elements[#mouse_leave_elements + 1] = element
end
end
@@ -122,7 +122,7 @@ function Elements:proximity_trigger(name, ...)
for i = #self._all, 1, -1 do
local element = self._all[i]
if element.enabled then
if element.proximity_raw == 0 then
if element.proximity_raw <= 0 then
if element:trigger(name, ...) == 'stop_propagation' then break end
end
if element:trigger('global_' .. name, ...) == 'stop_propagation' then break end
@@ -149,4 +149,4 @@ end
function Elements:has(id) return self[id] ~= nil end
function Elements:ipairs() return ipairs(self._all) end
return Elements
return Elements