From 381bc6521c6f4a5e7fc176f99f3dac773beccd3f Mon Sep 17 00:00:00 2001 From: Mihai Alexandru <77043862+MAJigsaw77@users.noreply.github.com> Date: Thu, 31 Oct 2024 13:12:07 +0200 Subject: [PATCH] Fix an issue with FunkinButton overlap checks Co-Authored-By: Mihai Alexandru <77043862+majigsaw77@users.noreply.github.com> --- source/funkin/mobile/ui/FunkinButton.hx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/funkin/mobile/ui/FunkinButton.hx b/source/funkin/mobile/ui/FunkinButton.hx index 510d7ead9..e537f41e6 100644 --- a/source/funkin/mobile/ui/FunkinButton.hx +++ b/source/funkin/mobile/ui/FunkinButton.hx @@ -131,11 +131,15 @@ class FunkinButton extends FunkinSprite implements IFlxInput { final overlapFound:Bool = checkTouchOverlap(); - if (currentInput != null && currentInput.justReleased && overlapFound) onUpHandler(); + if (currentInput != null && currentInput.justReleased) + { + onUpHandler(); + } - if (status != FunkinButtonStatus.NORMAL - && (!overlapFound || (currentInput != null && currentInput.justReleased)) - && !SwipeUtil.swipeAny) onOutHandler(); + if (status != FunkinButtonStatus.NORMAL && !SwipeUtil.swipeAny && (currentInput != null && !currentInput.pressed)) + { + onOutHandler(); + } } #end