Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions addons/libs/images.lua
Original file line number Diff line number Diff line change
Expand Up @@ -348,15 +348,13 @@ function images.hover(t, x, y)
return false
end

local pos_x, pos_y = t:pos()
local off_x, off_y = t:get_extents()

-- print(pos_x, pos_y, off_x, off_y)
local start_pos_x, start_pos_y = t:pos()
local end_pos_x, end_pos_y = t:get_extents()

return (pos_x <= x and x <= pos_x + off_x
or pos_x >= x and x >= pos_x + off_x)
and (pos_y <= y and y <= pos_y + off_y
or pos_y >= y and y >= pos_y + off_y)
return (start_pos_x <= x and x <= end_pos_x
or start_pos_x >= x and x >= end_pos_x)
and (start_pos_y <= y and y <= end_pos_y
or start_pos_y >= y and y >= end_pos_y)
end

function images.destroy(t)
Expand Down