From beb64528fbcfbedb0ba70a2987e8af215368ca22 Mon Sep 17 00:00:00 2001 From: MoonDroid <81515012+moondroidcoder@users.noreply.github.com> Date: Thu, 17 Jul 2025 02:13:56 +0700 Subject: [PATCH] Properly manage swipe threshold on states. --- source/funkin/play/PauseSubState.hx | 3 --- source/funkin/ui/freeplay/FreeplayState.hx | 1 - source/funkin/ui/options/OptionsState.hx | 3 +++ 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/source/funkin/play/PauseSubState.hx b/source/funkin/play/PauseSubState.hx index 7616a4b08..e681f42d2 100644 --- a/source/funkin/play/PauseSubState.hx +++ b/source/funkin/play/PauseSubState.hx @@ -745,9 +745,6 @@ class PauseSubState extends MusicBeatSubState clearAndAddMenuEntries(); updateMetadataText(); changeSelection(); - #if FEATURE_TOUCH_CONTROLS - SwipeUtil.calculateSwipeThreshold(menuEntryText.members, Y); - #end } /** diff --git a/source/funkin/ui/freeplay/FreeplayState.hx b/source/funkin/ui/freeplay/FreeplayState.hx index 9ab50a036..ad1553af3 100644 --- a/source/funkin/ui/freeplay/FreeplayState.hx +++ b/source/funkin/ui/freeplay/FreeplayState.hx @@ -767,7 +767,6 @@ class FreeplayState extends MusicBeatSubState fadeDots(true); #if FEATURE_TOUCH_CONTROLS - SwipeUtil.calculateSwipeThreshold(grpCapsules.members, Y); FlxG.touches.swipeThreshold.x = 60; #end }; diff --git a/source/funkin/ui/options/OptionsState.hx b/source/funkin/ui/options/OptionsState.hx index 5e007327a..ed456034d 100644 --- a/source/funkin/ui/options/OptionsState.hx +++ b/source/funkin/ui/options/OptionsState.hx @@ -257,6 +257,9 @@ class OptionsMenu extends Page onMenuChange(items.members[0]); items.selectItem(OptionsState.rememberedSelectedIndex); + #if FEATURE_TOUCH_CONTROLS + FlxG.touches.swipeThreshold.y = 100; + #end } function onMenuChange(selected:TextMenuItem):Void