Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/funkin/ui/freeplay/FreeplayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1730,12 +1730,12 @@ class FreeplayState extends MusicBeatSubState

handleDirectionalInput(elapsed);

final wheelAmount:Float = #if !html5 FlxG.mouse.wheel #else FlxG.mouse.wheel / 8 #end;
final wheelAmount:Int = Std.int(FlxMath.bound(FlxG.mouse.wheel, -1, 1));

if (wheelAmount != 0)
{
dj?.onPlayerAction(); // dj?.resetAFKTimer();
changeSelection(-Math.round(wheelAmount));
changeSelection(-wheelAmount);
}

handleDifficultySwitch();
Expand Down
18 changes: 5 additions & 13 deletions source/funkin/ui/story/StoryMenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import flixel.group.FlxGroup.FlxTypedGroup;
import flixel.text.FlxText;
import flixel.tweens.FlxEase;
import flixel.tweens.FlxTween;
import flixel.math.FlxMath;
import flixel.util.FlxColor;
import flixel.util.FlxTimer;
import funkin.audio.FunkinSound;
Expand Down Expand Up @@ -372,21 +373,12 @@ class StoryMenuState extends MusicBeatState
changeDifficulty(0);
}

#if !html5
if (FlxG.mouse.wheel != 0)
{
changeLevel(-Math.round(FlxG.mouse.wheel));
}
#else
if (FlxG.mouse.wheel < 0)
{
changeLevel(-Math.round(FlxG.mouse.wheel / 8));
}
else if (FlxG.mouse.wheel > 0)
final wheelAmount:Int = Std.int(FlxMath.bound(FlxG.mouse.wheel, -1, 1));

if (wheelAmount != 0)
{
changeLevel(-Math.round(FlxG.mouse.wheel / 8));
changeLevel(-wheelAmount);
}
#end

// TODO: Querying UI_RIGHT_P (justPressed) after UI_RIGHT always returns false. Fix it!
if (controls.UI_RIGHT_P #if FEATURE_TOUCH_CONTROLS
Expand Down
Loading