File tree 6 files changed +18
-24
lines changed
6 files changed +18
-24
lines changed Original file line number Diff line number Diff line change @@ -92,15 +92,11 @@ function update(elapsed) {
92
92
93
93
if (! canDoShit ) return ;
94
94
var oldSec = curSelected ;
95
- if (controls. DOWN_P )
96
- changeSelection (1 , false );
97
- if (controls. UP_P )
98
- changeSelection (- 1 );
99
95
100
- if (oldSec != curSelected ) {
101
- FlxG .sound .play (Paths .sound (isThorns ? ' pixel/type' : ' pixel/pixelText' ));
102
- }
96
+ changeSelection ((controls. UP_P ? - 1 : 0 ) + (controls. DOWN_P ? 1 : 0 ) - FlxG .mouse .wheel );
103
97
98
+ if (oldSec != curSelected )
99
+ FlxG .sound .play (Paths .sound (isThorns ? ' pixel/type' : ' pixel/pixelText' ));
104
100
105
101
if (controls. ACCEPT ) {
106
102
FlxG .sound .play (Paths .sound (isThorns ? ' pixel/ANGRY' : ' pixel/clickText' ));
@@ -118,7 +114,7 @@ function update(elapsed) {
118
114
}
119
115
}
120
116
121
- function changeSelection (change ) {
117
+ function changeSelection (change ) { // this overrides the function inside of the normal pause btw, so no event gets called - Nex
122
118
curSelected + = change ;
123
119
124
120
if (curSelected < 0 )
Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ class FreeplayState extends MusicBeatState
216
216
lerpScore = intendedScore ;
217
217
218
218
if (canSelect ) {
219
- changeSelection ((controls. UP_P ? - 1 : 0 ) + (controls. DOWN_P ? 1 : 0 ));
219
+ changeSelection ((controls. UP_P ? - 1 : 0 ) + (controls. DOWN_P ? 1 : 0 ) - FlxG . mouse . wheel );
220
220
changeDiff ((controls. LEFT_P ? - 1 : 0 ) + (controls. RIGHT_P ? 1 : 0 ));
221
221
changeCoopMode ((FlxG .keys .justPressed .TAB ? 1 : 0 ));
222
222
// putting it before so that its actually smooth
Original file line number Diff line number Diff line change @@ -109,11 +109,12 @@ class MainMenuState extends MusicBeatState
109
109
*/
110
110
}
111
111
112
- if (controls. UP_P )
113
- changeItem (- 1 );
112
+ var upP = controls. UP_P ;
113
+ var downP = controls. DOWN_P ;
114
+ var scroll = FlxG .mouse .wheel ;
114
115
115
- if (controls. DOWN_P )
116
- changeItem (1 );
116
+ if (upP || downP || scroll != 0 ) // like this we wont break mods that expect a 0 change event when calling sometimes - Nex
117
+ changeItem (( upP ? - 1 : 0 ) + ( downP ? 1 : 0 ) - scroll );
117
118
118
119
if (controls. BACK )
119
120
FlxG .switchState (new TitleState ());
@@ -127,9 +128,7 @@ class MainMenuState extends MusicBeatState
127
128
#end
128
129
129
130
if (controls. ACCEPT )
130
- {
131
131
selectItem ();
132
- }
133
132
}
134
133
135
134
super .update (elapsed );
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ class ModSwitchMenu extends MusicBeatSubstate {
39
39
public override function update (elapsed : Float ) {
40
40
super .update (elapsed );
41
41
42
- changeSelection ((controls. DOWN_P ? 1 : 0 ) + (controls. UP_P ? - 1 : 0 ));
42
+ changeSelection ((controls. DOWN_P ? 1 : 0 ) + (controls. UP_P ? - 1 : 0 ) - FlxG . mouse . wheel );
43
43
44
44
if (controls. ACCEPT ) {
45
45
ModsFolder .switchMod (mods [curSelected ]);
@@ -64,4 +64,4 @@ class ModSwitchMenu extends MusicBeatSubstate {
64
64
alphabets .members [curSelected ].alpha = 1 ;
65
65
}
66
66
}
67
- #end
67
+ #end
Original file line number Diff line number Diff line change @@ -124,13 +124,12 @@ class PauseSubState extends MusicBeatSubstate
124
124
125
125
var upP = controls. UP_P ;
126
126
var downP = controls. DOWN_P ;
127
- var accepted = controls. ACCEPT ;
127
+ var scroll = FlxG . mouse . wheel ;
128
128
129
- if (upP )
130
- changeSelection (- 1 );
131
- if (downP )
132
- changeSelection (1 );
133
- if (accepted )
129
+ if (upP || downP || scroll != 0 ) // like this we wont break mods that expect a 0 change event when calling sometimes - Nex
130
+ changeSelection ((upP ? - 1 : 0 ) + (downP ? 1 : 0 ) - scroll );
131
+
132
+ if (controls. ACCEPT )
134
133
selectOption ();
135
134
}
136
135
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ class StoryMenuState extends MusicBeatState {
142
142
}
143
143
144
144
changeDifficulty ((controls. LEFT_P ? - 1 : 0 ) + (controls. RIGHT_P ? 1 : 0 ));
145
- changeWeek ((controls. UP_P ? - 1 : 0 ) + (controls. DOWN_P ? 1 : 0 ));
145
+ changeWeek ((controls. UP_P ? - 1 : 0 ) + (controls. DOWN_P ? 1 : 0 ) - FlxG . mouse . wheel );
146
146
147
147
if (controls. ACCEPT )
148
148
selectWeek ();
You can’t perform that action at this time.
0 commit comments