This commit is contained in:
Squishy (C6H12O6+NaCl+H2O)
2024-05-21 23:43:55 +07:00
parent 4f02fb7815
commit 083a642ab3
2 changed files with 2 additions and 2 deletions

View File

@@ -120,7 +120,7 @@ function button:press(x, y)
end
---Trigger release action, don't need ``self._hovering`` to ``true``
function button:release(x, y)
if self:isHovering(x, y) then
if self:isHovering(x, y) and self._pressed then
self._pressed = false
self.codeWhenReleased()
end

View File

@@ -83,7 +83,7 @@ function TouchConfigScene:onInputPress(e)
end
---@param e SCENE_onInput
function TouchConfigScene:onInputRelease(e)
if e.type == "mouse" or e.type == "touch" then
if e.x and e.y then
BUTTON.release(buttonList, e.x, e.y)
end
end