diff --git a/libs/simple-button.lua b/libs/simple-button.lua index c442da6..9f3063a 100644 --- a/libs/simple-button.lua +++ b/libs/simple-button.lua @@ -120,9 +120,7 @@ function button:release(x, y, isMouse) if self:isHovering(x, y) and self._pressed then self.codeWhenReleased() self._pressed = false - if isMouse then - self._hovering = self:isHovering(x, y) - else + if not love.mouse.isCursorSupported() then self._hovering = false end end diff --git a/main.lua b/main.lua index 6ca9bd9..23fcf0a 100644 --- a/main.lua +++ b/main.lua @@ -151,6 +151,7 @@ function love.touchdragged(id,x,y,dx,dy) end end function love.touchreleased(id,x,y) + PlaySE("demote") local x,y=GLOBAL_TRANSFORM:inverseTransformPoint(x,y) if not VCTRL.release(id) then SCENE:onInputRelease{type = "touch", x = x, y = y, dx = 0, dy = 0, id = id}