mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-03-22 18:09:33 +00:00
add TAB to controls stuff
This commit is contained in:
parent
57c995e19d
commit
3a37b79a55
|
@ -64,6 +64,7 @@ class Controls extends FlxActionSet
|
||||||
var _freeplay_favorite = new FunkinAction(Action.FREEPLAY_FAVORITE);
|
var _freeplay_favorite = new FunkinAction(Action.FREEPLAY_FAVORITE);
|
||||||
var _freeplay_left = new FunkinAction(Action.FREEPLAY_LEFT);
|
var _freeplay_left = new FunkinAction(Action.FREEPLAY_LEFT);
|
||||||
var _freeplay_right = new FunkinAction(Action.FREEPLAY_RIGHT);
|
var _freeplay_right = new FunkinAction(Action.FREEPLAY_RIGHT);
|
||||||
|
var _freeplay_char_select = new FunkinAction(Action.FREEPLAY_CHAR_SELECT);
|
||||||
var _cutscene_advance = new FunkinAction(Action.CUTSCENE_ADVANCE);
|
var _cutscene_advance = new FunkinAction(Action.CUTSCENE_ADVANCE);
|
||||||
var _debug_menu = new FunkinAction(Action.DEBUG_MENU);
|
var _debug_menu = new FunkinAction(Action.DEBUG_MENU);
|
||||||
var _debug_chart = new FunkinAction(Action.DEBUG_CHART);
|
var _debug_chart = new FunkinAction(Action.DEBUG_CHART);
|
||||||
|
@ -262,6 +263,11 @@ class Controls extends FlxActionSet
|
||||||
inline function get_FREEPLAY_RIGHT()
|
inline function get_FREEPLAY_RIGHT()
|
||||||
return _freeplay_right.check();
|
return _freeplay_right.check();
|
||||||
|
|
||||||
|
public var FREEPLAY_CHAR_SELECT(get, never):Bool;
|
||||||
|
|
||||||
|
inline function get_FREEPLAY_CHAR_SELECT()
|
||||||
|
return _freeplay_char_select.check();
|
||||||
|
|
||||||
public var CUTSCENE_ADVANCE(get, never):Bool;
|
public var CUTSCENE_ADVANCE(get, never):Bool;
|
||||||
|
|
||||||
inline function get_CUTSCENE_ADVANCE()
|
inline function get_CUTSCENE_ADVANCE()
|
||||||
|
@ -318,6 +324,7 @@ class Controls extends FlxActionSet
|
||||||
add(_freeplay_favorite);
|
add(_freeplay_favorite);
|
||||||
add(_freeplay_left);
|
add(_freeplay_left);
|
||||||
add(_freeplay_right);
|
add(_freeplay_right);
|
||||||
|
add(_freeplay_char_select);
|
||||||
add(_cutscene_advance);
|
add(_cutscene_advance);
|
||||||
add(_debug_menu);
|
add(_debug_menu);
|
||||||
add(_debug_chart);
|
add(_debug_chart);
|
||||||
|
@ -424,6 +431,7 @@ class Controls extends FlxActionSet
|
||||||
case FREEPLAY_FAVORITE: _freeplay_favorite;
|
case FREEPLAY_FAVORITE: _freeplay_favorite;
|
||||||
case FREEPLAY_LEFT: _freeplay_left;
|
case FREEPLAY_LEFT: _freeplay_left;
|
||||||
case FREEPLAY_RIGHT: _freeplay_right;
|
case FREEPLAY_RIGHT: _freeplay_right;
|
||||||
|
case FREEPLAY_CHAR_SELECT: _freeplay_char_select;
|
||||||
case CUTSCENE_ADVANCE: _cutscene_advance;
|
case CUTSCENE_ADVANCE: _cutscene_advance;
|
||||||
case DEBUG_MENU: _debug_menu;
|
case DEBUG_MENU: _debug_menu;
|
||||||
case DEBUG_CHART: _debug_chart;
|
case DEBUG_CHART: _debug_chart;
|
||||||
|
@ -500,6 +508,8 @@ class Controls extends FlxActionSet
|
||||||
func(_freeplay_left, JUST_PRESSED);
|
func(_freeplay_left, JUST_PRESSED);
|
||||||
case FREEPLAY_RIGHT:
|
case FREEPLAY_RIGHT:
|
||||||
func(_freeplay_right, JUST_PRESSED);
|
func(_freeplay_right, JUST_PRESSED);
|
||||||
|
case FREEPLAY_CHAR_SELECT:
|
||||||
|
func(_freeplay_char_select, JUST_PRESSED);
|
||||||
case CUTSCENE_ADVANCE:
|
case CUTSCENE_ADVANCE:
|
||||||
func(_cutscene_advance, JUST_PRESSED);
|
func(_cutscene_advance, JUST_PRESSED);
|
||||||
case DEBUG_MENU:
|
case DEBUG_MENU:
|
||||||
|
@ -721,6 +731,7 @@ class Controls extends FlxActionSet
|
||||||
bindKeys(Control.FREEPLAY_FAVORITE, getDefaultKeybinds(scheme, Control.FREEPLAY_FAVORITE));
|
bindKeys(Control.FREEPLAY_FAVORITE, getDefaultKeybinds(scheme, Control.FREEPLAY_FAVORITE));
|
||||||
bindKeys(Control.FREEPLAY_LEFT, getDefaultKeybinds(scheme, Control.FREEPLAY_LEFT));
|
bindKeys(Control.FREEPLAY_LEFT, getDefaultKeybinds(scheme, Control.FREEPLAY_LEFT));
|
||||||
bindKeys(Control.FREEPLAY_RIGHT, getDefaultKeybinds(scheme, Control.FREEPLAY_RIGHT));
|
bindKeys(Control.FREEPLAY_RIGHT, getDefaultKeybinds(scheme, Control.FREEPLAY_RIGHT));
|
||||||
|
bindKeys(Control.FREEPLAY_CHAR_SELECT, getDefaultKeybinds(scheme, Control.FREEPLAY_CHAR_SELECT));
|
||||||
bindKeys(Control.CUTSCENE_ADVANCE, getDefaultKeybinds(scheme, Control.CUTSCENE_ADVANCE));
|
bindKeys(Control.CUTSCENE_ADVANCE, getDefaultKeybinds(scheme, Control.CUTSCENE_ADVANCE));
|
||||||
bindKeys(Control.DEBUG_MENU, getDefaultKeybinds(scheme, Control.DEBUG_MENU));
|
bindKeys(Control.DEBUG_MENU, getDefaultKeybinds(scheme, Control.DEBUG_MENU));
|
||||||
bindKeys(Control.DEBUG_CHART, getDefaultKeybinds(scheme, Control.DEBUG_CHART));
|
bindKeys(Control.DEBUG_CHART, getDefaultKeybinds(scheme, Control.DEBUG_CHART));
|
||||||
|
@ -756,6 +767,7 @@ class Controls extends FlxActionSet
|
||||||
case Control.FREEPLAY_FAVORITE: return [F]; // Favorite a song on the menu
|
case Control.FREEPLAY_FAVORITE: return [F]; // Favorite a song on the menu
|
||||||
case Control.FREEPLAY_LEFT: return [Q]; // Switch tabs on the menu
|
case Control.FREEPLAY_LEFT: return [Q]; // Switch tabs on the menu
|
||||||
case Control.FREEPLAY_RIGHT: return [E]; // Switch tabs on the menu
|
case Control.FREEPLAY_RIGHT: return [E]; // Switch tabs on the menu
|
||||||
|
case Control.FREEPLAY_CHAR_SELECT: return [TAB];
|
||||||
case Control.CUTSCENE_ADVANCE: return [Z, ENTER];
|
case Control.CUTSCENE_ADVANCE: return [Z, ENTER];
|
||||||
case Control.DEBUG_MENU: return [GRAVEACCENT];
|
case Control.DEBUG_MENU: return [GRAVEACCENT];
|
||||||
case Control.DEBUG_CHART: return [];
|
case Control.DEBUG_CHART: return [];
|
||||||
|
@ -784,6 +796,7 @@ class Controls extends FlxActionSet
|
||||||
case Control.FREEPLAY_FAVORITE: return [F]; // Favorite a song on the menu
|
case Control.FREEPLAY_FAVORITE: return [F]; // Favorite a song on the menu
|
||||||
case Control.FREEPLAY_LEFT: return [Q]; // Switch tabs on the menu
|
case Control.FREEPLAY_LEFT: return [Q]; // Switch tabs on the menu
|
||||||
case Control.FREEPLAY_RIGHT: return [E]; // Switch tabs on the menu
|
case Control.FREEPLAY_RIGHT: return [E]; // Switch tabs on the menu
|
||||||
|
case Control.FREEPLAY_CHAR_SELECT: return [TAB];
|
||||||
case Control.CUTSCENE_ADVANCE: return [G, Z];
|
case Control.CUTSCENE_ADVANCE: return [G, Z];
|
||||||
case Control.DEBUG_MENU: return [GRAVEACCENT];
|
case Control.DEBUG_MENU: return [GRAVEACCENT];
|
||||||
case Control.DEBUG_CHART: return [];
|
case Control.DEBUG_CHART: return [];
|
||||||
|
@ -812,6 +825,7 @@ class Controls extends FlxActionSet
|
||||||
case Control.FREEPLAY_FAVORITE: return [];
|
case Control.FREEPLAY_FAVORITE: return [];
|
||||||
case Control.FREEPLAY_LEFT: return [];
|
case Control.FREEPLAY_LEFT: return [];
|
||||||
case Control.FREEPLAY_RIGHT: return [];
|
case Control.FREEPLAY_RIGHT: return [];
|
||||||
|
case Control.FREEPLAY_CHAR_SELECT: return [];
|
||||||
case Control.CUTSCENE_ADVANCE: return [ENTER];
|
case Control.CUTSCENE_ADVANCE: return [ENTER];
|
||||||
case Control.DEBUG_MENU: return [];
|
case Control.DEBUG_MENU: return [];
|
||||||
case Control.DEBUG_CHART: return [];
|
case Control.DEBUG_CHART: return [];
|
||||||
|
@ -1548,6 +1562,7 @@ enum Control
|
||||||
FREEPLAY_FAVORITE;
|
FREEPLAY_FAVORITE;
|
||||||
FREEPLAY_LEFT;
|
FREEPLAY_LEFT;
|
||||||
FREEPLAY_RIGHT;
|
FREEPLAY_RIGHT;
|
||||||
|
FREEPLAY_CHAR_SELECT;
|
||||||
// WINDOW
|
// WINDOW
|
||||||
WINDOW_SCREENSHOT;
|
WINDOW_SCREENSHOT;
|
||||||
WINDOW_FULLSCREEN;
|
WINDOW_FULLSCREEN;
|
||||||
|
@ -1602,6 +1617,7 @@ enum abstract Action(String) to String from String
|
||||||
var FREEPLAY_FAVORITE = "freeplay_favorite";
|
var FREEPLAY_FAVORITE = "freeplay_favorite";
|
||||||
var FREEPLAY_LEFT = "freeplay_left";
|
var FREEPLAY_LEFT = "freeplay_left";
|
||||||
var FREEPLAY_RIGHT = "freeplay_right";
|
var FREEPLAY_RIGHT = "freeplay_right";
|
||||||
|
var FREEPLAY_CHAR_SELECT = "freeplay_char_select";
|
||||||
// VOLUME
|
// VOLUME
|
||||||
var VOLUME_UP = "volume_up";
|
var VOLUME_UP = "volume_up";
|
||||||
var VOLUME_DOWN = "volume_down";
|
var VOLUME_DOWN = "volume_down";
|
||||||
|
|
|
@ -1232,7 +1232,7 @@ class FreeplayState extends MusicBeatSubState
|
||||||
// }
|
// }
|
||||||
#end
|
#end
|
||||||
|
|
||||||
if (FlxG.keys.justPressed.TAB)
|
if (controls.FREEPLAY_CHAR_SELECT && !busy)
|
||||||
{
|
{
|
||||||
FlxG.switchState(new funkin.ui.charSelect.CharSelectSubState());
|
FlxG.switchState(new funkin.ui.charSelect.CharSelectSubState());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue