From b22f09d4daf8784fdf46fec564abac21e20ede3e Mon Sep 17 00:00:00 2001 From: JugieNoob Date: Sun, 12 May 2024 02:21:59 +0200 Subject: [PATCH] Fixed Scrolling on HTML5 Platforms --- source/funkin/ui/freeplay/FreeplayState.hx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/funkin/ui/freeplay/FreeplayState.hx b/source/funkin/ui/freeplay/FreeplayState.hx index b0d435274..d4a89531c 100644 --- a/source/funkin/ui/freeplay/FreeplayState.hx +++ b/source/funkin/ui/freeplay/FreeplayState.hx @@ -889,11 +889,24 @@ class FreeplayState extends MusicBeatSubState spamTimer = 0; } + #if !html5 if (FlxG.mouse.wheel != 0) { dj.resetAFKTimer(); changeSelection(-Math.round(FlxG.mouse.wheel)); } + #else + if (FlxG.mouse.wheel < 0) + { + dj.resetAFKTimer(); + changeSelection(-Math.round(FlxG.mouse.wheel / 4)); + } + else if (FlxG.mouse.wheel > 0) + { + dj.resetAFKTimer(); + changeSelection(-Math.round(FlxG.mouse.wheel / 8)); + } + #end if (controls.UI_LEFT_P && !FlxG.keys.pressed.CONTROL) {