From c60d235bf5fb9a046e0756d3a89d2ea0961a29ed Mon Sep 17 00:00:00 2001 From: "Squishy (C6H12O6+NaCl+H2O)" <106439598+SweetSea-ButImNotSweet@users.noreply.github.com> Date: Tue, 21 May 2024 21:58:08 +0700 Subject: [PATCH] TEST --- libs/simple-button.lua | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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