Fixed ImageButton checking mask bounds on mask instead of image
This commit is contained in:
parent
0a723777ed
commit
bec02e99c5
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ return function(core, normal, ...)
|
||||||
core:registerMouseHit(opt.id, x, y, function(u,v)
|
core:registerMouseHit(opt.id, x, y, function(u,v)
|
||||||
-- mouse in image?
|
-- mouse in image?
|
||||||
u, v = math.floor(u+.5), math.floor(v+.5)
|
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
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue