Merge remote-tracking branch 'upstream/main'

This commit is contained in:
Ne_Eo
2024-11-29 22:02:37 +01:00
22 changed files with 214 additions and 38 deletions
+1 -1
View File
@@ -218,7 +218,7 @@ class FreeplayState extends MusicBeatState
lerpScore = intendedScore;
if (canSelect) {
changeSelection((controls.UP_P ? -1 : 0) + (controls.DOWN_P ? 1 : 0));
changeSelection((controls.UP_P ? -1 : 0) + (controls.DOWN_P ? 1 : 0) - FlxG.mouse.wheel);
changeDiff((controls.LEFT_P ? -1 : 0) + (controls.RIGHT_P ? 1 : 0));
changeCoopMode((FlxG.keys.justPressed.TAB ? 1 : 0));
// putting it before so that its actually smooth
+5 -6
View File
@@ -106,11 +106,12 @@ class MainMenuState extends MusicBeatState
*/
}
if (controls.UP_P)
changeItem(-1);
var upP = controls.UP_P;
var downP = controls.DOWN_P;
var scroll = FlxG.mouse.wheel;
if (controls.DOWN_P)
changeItem(1);
if (upP || downP || scroll != 0) // like this we wont break mods that expect a 0 change event when calling sometimes - Nex
changeItem((upP ? -1 : 0) + (downP ? 1 : 0) - scroll);
if (controls.BACK)
FlxG.switchState(new TitleState());
@@ -124,9 +125,7 @@ class MainMenuState extends MusicBeatState
#end
if (controls.ACCEPT)
{
selectItem();
}
}
super.update(elapsed);
+2 -2
View File
@@ -42,7 +42,7 @@ class ModSwitchMenu extends MusicBeatSubstate {
public override function update(elapsed:Float) {
super.update(elapsed);
changeSelection((controls.DOWN_P ? 1 : 0) + (controls.UP_P ? -1 : 0));
changeSelection((controls.DOWN_P ? 1 : 0) + (controls.UP_P ? -1 : 0) - FlxG.mouse.wheel);
if (controls.ACCEPT) {
ModsFolder.switchMod(mods[curSelected]);
@@ -67,4 +67,4 @@ class ModSwitchMenu extends MusicBeatSubstate {
alphabets.members[curSelected].alpha = 1;
}
}
#end
#end
+5 -6
View File
@@ -127,13 +127,12 @@ class PauseSubState extends MusicBeatSubstate
var upP = controls.UP_P;
var downP = controls.DOWN_P;
var accepted = controls.ACCEPT;
var scroll = FlxG.mouse.wheel;
if (upP)
changeSelection(-1);
if (downP)
changeSelection(1);
if (accepted)
if (upP || downP || scroll != 0) // like this we wont break mods that expect a 0 change event when calling sometimes - Nex
changeSelection((upP ? -1 : 0) + (downP ? 1 : 0) - scroll);
if (controls.ACCEPT)
selectOption();
}
+1 -1
View File
@@ -149,7 +149,7 @@ class StoryMenuState extends MusicBeatState {
}
changeDifficulty((controls.LEFT_P ? -1 : 0) + (controls.RIGHT_P ? 1 : 0));
changeWeek((controls.UP_P ? -1 : 0) + (controls.DOWN_P ? 1 : 0));
changeWeek((controls.UP_P ? -1 : 0) + (controls.DOWN_P ? 1 : 0) - FlxG.mouse.wheel);
if (controls.ACCEPT)
selectWeek();