From: Brendan Hansen Date: Sun, 24 Feb 2019 21:26:06 +0000 (-0600) Subject: small bugfix X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=483297cba801187256108c516c095b744a748d8a;p=graph-algorithms.git small bugfix --- diff --git a/main.lua b/main.lua index 0e2e229..3d2ade3 100644 --- a/main.lua +++ b/main.lua @@ -251,8 +251,9 @@ function love.load() mousedown = function(self, x, y) for i, button in ipairs(self.buttons) do - if y >= (i - 1) * 60 + 10 and y <= i * 60 + 10 then + if y >= (i - 1) * 60 + 10 and y <= i * 60 - 10 then button:click() + break end end end;