From 2f6e6ef7cde080fff840ec09213ed6722a17d954 Mon Sep 17 00:00:00 2001 From: sector-a <82838084+sector-a@users.noreply.github.com> Date: Sat, 18 Jan 2025 03:23:28 +0300 Subject: [PATCH] Bound hitbox showcases x axis on dragging --- source/funkin/mobile/ui/options/ControlsSchemeMenu.hx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/funkin/mobile/ui/options/ControlsSchemeMenu.hx b/source/funkin/mobile/ui/options/ControlsSchemeMenu.hx index 734cff2fd..06d547b0a 100644 --- a/source/funkin/mobile/ui/options/ControlsSchemeMenu.hx +++ b/source/funkin/mobile/ui/options/ControlsSchemeMenu.hx @@ -370,6 +370,9 @@ class ControlsSchemeMenu extends MusicBeatSubState final showcasesTargetX:Float = originX + dragDistance * 10; hitboxShowcases.x = MathUtil.smoothLerp(hitboxShowcases.x, showcasesTargetX, elapsed, 0.5); + final minShowcasesX:Float = -1500 * availableSchemes.length; + hitboxShowcases.x = FlxMath.bound(hitboxShowcases.x, minShowcasesX, 400); + final targetIndex:Int = Math.round(hitboxShowcases.x / -1500); if (currentIndex != targetIndex) setSelection(targetIndex); }