diff --git a/source/funkin/mobile/ui/FunkinButton.hx b/source/funkin/mobile/ui/FunkinButton.hx index 6b58c0d5a..77d9cd15b 100644 --- a/source/funkin/mobile/ui/FunkinButton.hx +++ b/source/funkin/mobile/ui/FunkinButton.hx @@ -191,10 +191,13 @@ class FunkinButton extends FunkinSprite implements IFlxInput if (overlapsPoint(worldPos, true, camera)) { touchID = touch.touchPointID; - var prevButton = buttonsTouchID.get(touchID); - if (prevButton != null && prevButton != this && !prevButton.limitToBounds) + if (buttonsTouchID.exists(touchID) && buttonsTouchID.get(touchID) != this) { - prevButton.onOutHandler(); + var prevButton = buttonsTouchID.get(touchID); + if (prevButton.status == FunkinButtonStatus.PRESSED && prevButton != null && !prevButton.limitToBounds) + { + prevButton.onOutHandler(); + } } buttonsTouchID.set(touchID, this); diff --git a/source/funkin/mobile/ui/FunkinPolygonButton.hx b/source/funkin/mobile/ui/FunkinPolygonButton.hx index 5f1b97b5e..5e36d966f 100644 --- a/source/funkin/mobile/ui/FunkinPolygonButton.hx +++ b/source/funkin/mobile/ui/FunkinPolygonButton.hx @@ -76,10 +76,10 @@ class FunkinPolygonButton extends FunkinButton @:noCompletion private override function checkTouchOverlap(?touch:FlxTouch):Bool { - var touches = touch == null ? FlxG.touches.list : [touch]; - for (touch in touches) + if (polygon != null && polygon.length >= 6 && polygon.length % 2 == 0) { - if (polygon != null && polygon.length >= 6 && polygon.length % 2 == 0) + var touches = touch == null ? FlxG.touches.list : [touch]; + for (touch in touches) { for (camera in cameras) {