From bec02e99c5487dbdd118967b612f5e04c95c09db Mon Sep 17 00:00:00 2001 From: Simon Larsen Date: Sun, 12 Aug 2018 20:58:48 +0200 Subject: [PATCH] Fixed ImageButton checking mask bounds on mask instead of image --- imagebutton.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imagebutton.lua b/imagebutton.lua index cf7483a..8a56383 100644 --- a/imagebutton.lua +++ b/imagebutton.lua @@ -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