diff --git a/libs/simple-button.lua b/libs/simple-button.lua index 4f309b5..387080a 100644 --- a/libs/simple-button.lua +++ b/libs/simple-button.lua @@ -121,11 +121,13 @@ function button:release(x, y, isMouse) if self._pressed then self.codeWhenReleased() self._pressed = false - end - if isMouse then - self:isHovering(x, y) - elseif self._hovering then - self._hovering = false + if isMouse then + self._hovering = self:isHovering(x, y) + error("mouse") + else + self._hovering = false + error("touch") + end end end end