From f11d7e8147656754e7dcb63d5427eaa55d8904f4 Mon Sep 17 00:00:00 2001 From: zacksgamerz <81515012+zacksgamerz@users.noreply.github.com> Date: Sat, 11 Jan 2025 01:42:10 +0700 Subject: [PATCH] Disabled wrapping in Story Menu and fixed an unknown bug with the swipe threshold. --- source/funkin/ui/story/StoryMenuState.hx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/funkin/ui/story/StoryMenuState.hx b/source/funkin/ui/story/StoryMenuState.hx index 73b7c758c..b5094ce65 100644 --- a/source/funkin/ui/story/StoryMenuState.hx +++ b/source/funkin/ui/story/StoryMenuState.hx @@ -232,7 +232,7 @@ class StoryMenuState extends MusicBeatState #end #if TOUCH_CONTROLS - SwipeUtil.calculateSwipeThreshold(levelTitles.members, Y, 4); + FlxG.touches.swipeThreshold.y = 100; #end } @@ -432,9 +432,15 @@ class StoryMenuState extends MusicBeatState currentIndex += change; + #if TOUCH_CONTROLS + // Dont wrap around w/ touch. + if (currentIndex < 0) currentIndex = 0; + if (currentIndex >= levelList.length) currentIndex = levelList.length - 1; + #else // Wrap around if (currentIndex < 0) currentIndex = levelList.length - 1; if (currentIndex >= levelList.length) currentIndex = 0; + #end var previousLevelId:String = currentLevelId; currentLevelId = levelList[currentIndex];