File tree Expand file tree Collapse file tree 2 files changed +7
-15
lines changed
Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -1730,12 +1730,12 @@ class FreeplayState extends MusicBeatSubState
17301730
17311731 handleDirectionalInput (elapsed );
17321732
1733- final wheelAmount : Float = #if !html5 FlxG . mouse . wheel #else FlxG .mouse .wheel / 8 #end ;
1733+ final wheelAmount : Int = Std . int ( FlxMath . bound ( FlxG .mouse .wheel , - 1 , 1 )) ;
17341734
17351735 if (wheelAmount != 0 )
17361736 {
17371737 dj ?. onPlayerAction (); // dj?.resetAFKTimer();
1738- changeSelection (- Math . round ( wheelAmount ) );
1738+ changeSelection (- wheelAmount );
17391739 }
17401740
17411741 handleDifficultySwitch ();
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import flixel.group.FlxGroup.FlxTypedGroup;
66import flixel .text .FlxText ;
77import flixel .tweens .FlxEase ;
88import flixel .tweens .FlxTween ;
9+ import flixel .math .FlxMath ;
910import flixel .util .FlxColor ;
1011import flixel .util .FlxTimer ;
1112import funkin .audio .FunkinSound ;
@@ -372,21 +373,12 @@ class StoryMenuState extends MusicBeatState
372373 changeDifficulty (0 );
373374 }
374375
375- #if !html5
376- if (FlxG .mouse .wheel != 0 )
377- {
378- changeLevel (- Math .round (FlxG .mouse .wheel ));
379- }
380- #else
381- if (FlxG .mouse .wheel < 0 )
382- {
383- changeLevel (- Math .round (FlxG .mouse .wheel / 8 ));
384- }
385- else if (FlxG .mouse .wheel > 0 )
376+ final wheelAmount : Int = Std .int (FlxMath .bound (FlxG .mouse .wheel , - 1 , 1 ));
377+
378+ if (wheelAmount != 0 )
386379 {
387- changeLevel (- Math . round ( FlxG . mouse . wheel / 8 ) );
380+ changeLevel (- wheelAmount );
388381 }
389- #end
390382
391383 // TODO: Querying UI_RIGHT_P (justPressed) after UI_RIGHT always returns false. Fix it!
392384 if (controls. UI_RIGHT_P #if FEATURE_TOUCH_CONTROLS
You can’t perform that action at this time.
0 commit comments