Disabled wrapping in Story Menu and fixed an unknown bug with the swipe threshold.

This commit is contained in:
zacksgamerz
2025-04-17 00:38:23 +03:00
committed by KarimAkra
parent 8f123e4ab9
commit f11d7e8147
+7 -1
View File
@@ -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];