driver.love/0007-on_text

11 lines
267 B
Plaintext

on_text = function(x,y)
for _,node in ipairs(Surface) do
if node.type == 'text' then
if x >= vx(node.x) and node.w and x < vx(node.x + node.w) then
if y >= vy(node.y) and node.h and y < vy(node.y + node.h) then
return node
end
end
end
end
end