Fixed ImageButton checking mask bounds on mask instead of image

This commit is contained in:
Simon Larsen 2018-08-12 20:58:48 +02:00
parent 0a723777ed
commit bec02e99c5

View file

@ -18,7 +18,7 @@ return function(core, normal, ...)
core:registerMouseHit(opt.id, x, y, function(u,v)
-- mouse in image?
u, v = math.floor(u+.5), math.floor(v+.5)
if u < 0 or u >= image:getWidth() or v < 0 or v >= mask:getHeight() then
if u < 0 or u >= image:getWidth() or v < 0 or v >= image:getHeight() then
return false
end