File tree Expand file tree Collapse file tree 6 files changed +22
-3
lines changed
Expand file tree Collapse file tree 6 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 4242 <str id =" back" >Back</str >
4343 <str id =" reset" >Reset</str >
4444 <str id =" pause" >Pause</str >
45+ <str id =" changeMode" >Change Mode</str >
4546 </group >
4647
4748 <str id =" category.engine" >Engine</str >
Original file line number Diff line number Diff line change 3838 <str id =" back" >Wstecz</str >
3939 <str id =" reset" >Reset</str >
4040 <str id =" pause" >Pauza</str >
41+ <str id =" changeMode" >Zmień Tryb</str >
4142 </group >
4243
4344 <str id =" category.engine" >Silnik</str >
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ enum Control
2222 ACCEPT ;
2323 BACK ;
2424 PAUSE ;
25+ CHANGE_MODE ;
2526 // CHEAT;
2627 SWITCHMOD ;
2728
@@ -145,6 +146,11 @@ class Controls extends FlxActionSet
145146 @:pressed (" reset" ) public var RESET_HOLD (get , set ): Bool ;
146147 @:justReleased (" reset" ) public var RESET_R (get , set ): Bool ;
147148
149+ @:gamepad ([FlxGamepadInputID .BACK ]) // select button
150+ @:justPressed (" change-mode" ) public var CHANGE_MODE (get , set ): Bool ;
151+ @:pressed (" change-mode" ) public var CHANGE_MODE_HOLD (get , set ): Bool ;
152+ @:justReleased (" change-mode" ) public var CHANGE_MODE_R (get , set ): Bool ;
153+
148154 // @:gamepad([])
149155 // @:justPressed("cheat") public var CHEAT(get, set): Bool;
150156 // @:pressed("cheat") public var CHEAT_HOLD(get, set): Bool;
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class FreeplayState extends MusicBeatState
5353 public var diffText : FlxText ;
5454
5555 /**
56- * Text containing the current coop/opponent mode ([TAB ] Co-Op mode)
56+ * Text containing the current coop/opponent mode ([KEYBINDS ] Co-Op mode)
5757 */
5858 public var coopText : FlxText ;
5959
@@ -237,7 +237,7 @@ class FreeplayState extends MusicBeatState
237237 if (canSelect ) {
238238 changeSelection ((controls. UP_P ? - 1 : 0 ) + (controls. DOWN_P ? 1 : 0 ) - FlxG .mouse .wheel );
239239 changeDiff ((controls. LEFT_P ? - 1 : 0 ) + (controls. RIGHT_P ? 1 : 0 ));
240- changeCoopMode ((FlxG . keys . justPressed . TAB ? 1 : 0 )); // TODO: make this configurable
240+ changeCoopMode ((controls. CHANGE_MODE ? 1 : 0 )); // TODO: make this configurable
241241 // putting it before so that its actually smooth
242242 updateOptionsAlpha ();
243243 }
@@ -430,7 +430,11 @@ class FreeplayState extends MusicBeatState
430430
431431 updateScore ();
432432
433- var key = " [TAB] " ; // TODO: make this configurable
433+ var coopBinds = [CoolUtil .keyToString (Options .P1_CHANGE_MODE [0 ]), CoolUtil .keyToString (Options .P2_CHANGE_MODE [0 ])].filter (x -> x != " ---" );
434+ if (coopBinds .length == 2 && coopBinds [1 ] == coopBinds [0 ]) coopBinds .pop ();
435+ else if (coopBinds .length == 0 ) coopBinds .push (" ---" );
436+
437+ var key = ' [ ${coopBinds .join (" / " )}] ' ;
434438
435439 if (bothEnabled ) {
436440 coopText .text = key + coopLabels [curCoopMode ];
Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ class Options
117117 public static var P1_ACCEPT : Array <FlxKey > = [ENTER ];
118118 public static var P1_BACK : Array <FlxKey > = [BACKSPACE ];
119119 public static var P1_PAUSE : Array <FlxKey > = [ENTER ];
120+ public static var P1_CHANGE_MODE : Array <FlxKey > = [TAB ];
120121
121122 // Misc
122123 public static var P1_RESET : Array <FlxKey > = [R ];
@@ -148,6 +149,7 @@ class Options
148149 public static var P2_ACCEPT : Array <FlxKey > = [SPACE ];
149150 public static var P2_BACK : Array <FlxKey > = [ESCAPE ];
150151 public static var P2_PAUSE : Array <FlxKey > = [ESCAPE ];
152+ public static var P2_CHANGE_MODE : Array <FlxKey > = [];
151153
152154 // Misc
153155 public static var P2_RESET : Array <FlxKey > = [];
@@ -179,6 +181,7 @@ class Options
179181 public static var SOLO_ACCEPT (get , null ): Array <FlxKey >;
180182 public static var SOLO_BACK (get , null ): Array <FlxKey >;
181183 public static var SOLO_PAUSE (get , null ): Array <FlxKey >;
184+ public static var SOLO_CHANGE_MODE (get , null ): Array <FlxKey >;
182185
183186 // Misc
184187 public static var SOLO_RESET (get , null ): Array <FlxKey >;
Original file line number Diff line number Diff line change @@ -97,6 +97,10 @@ class KeybindsOptions extends MusicBeatSubstate {
9797 name : translate (" ui.pause" ),
9898 control : ' PAUSE'
9999 },
100+ {
101+ name : translate (" ui.changeMode" ),
102+ control : ' CHANGE_MODE'
103+ },
100104 ]
101105 },
102106 {
You can’t perform that action at this time.
0 commit comments