allow me to use my mouse scroll wheel in the mod menu (+ more menus) (#450)

* Update ModSwitchMenu.hx

* fixed

* adding wheel to more menus

* forgor pixel

---------

Co-authored-by: ⍚~Nex <87421482+NexIsDumb@users.noreply.github.com>
This commit is contained in:
~ Care
2024-11-24 17:32:40 +01:00
committed by GitHub
co-authored by ⍚~Nex
parent 0afbbbf625
commit f6710550c8
6 changed files with 18 additions and 24 deletions
+4 -8
View File
@@ -92,15 +92,11 @@ function update(elapsed) {
if (!canDoShit) return;
var oldSec = curSelected;
if (controls.DOWN_P)
changeSelection(1, false);
if (controls.UP_P)
changeSelection(-1);
if (oldSec != curSelected) {
changeSelection((controls.UP_P ? -1 : 0) + (controls.DOWN_P ? 1 : 0) - FlxG.mouse.wheel);
if (oldSec != curSelected)
FlxG.sound.play(Paths.sound(isThorns ? 'pixel/type' : 'pixel/pixelText'));
}
if (controls.ACCEPT) {
FlxG.sound.play(Paths.sound(isThorns ? 'pixel/ANGRY' : 'pixel/clickText'));
@@ -118,7 +114,7 @@ function update(elapsed) {
}
}
function changeSelection(change) {
function changeSelection(change) { // this overrides the function inside of the normal pause btw, so no event gets called - Nex
curSelected += change;
if (curSelected < 0)