mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-14 19:25:16 -05:00
Merge remote-tracking branch 'origin/bugfix/web-screenshots' into rewrite/master
This commit is contained in:
commit
9a57762a9c
6 changed files with 90 additions and 24 deletions
10
project.hxp
10
project.hxp
|
@ -214,6 +214,12 @@ class Project extends HXProject {
|
||||||
*/
|
*/
|
||||||
static final FEATURE_OPEN_URL:FeatureFlag = "FEATURE_OPEN_URL";
|
static final FEATURE_OPEN_URL:FeatureFlag = "FEATURE_OPEN_URL";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* `-DFEATURE_SCREENSHOTS`
|
||||||
|
* If this flag is enabled, the game will support the screenshots feature.
|
||||||
|
*/
|
||||||
|
static final FEATURE_SCREENSHOTS:FeatureFlag = "FEATURE_SCREENSHOTS";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* `-DFEATURE_CHART_EDITOR`
|
* `-DFEATURE_CHART_EDITOR`
|
||||||
* If this flag is enabled, the Chart Editor will be accessible from the debug menu.
|
* If this flag is enabled, the Chart Editor will be accessible from the debug menu.
|
||||||
|
@ -494,6 +500,10 @@ class Project extends HXProject {
|
||||||
// Should be true except on web builds.
|
// Should be true except on web builds.
|
||||||
// Chart editor doesn't work there.
|
// Chart editor doesn't work there.
|
||||||
FEATURE_CHART_EDITOR.apply(this, !isWeb());
|
FEATURE_CHART_EDITOR.apply(this, !isWeb());
|
||||||
|
|
||||||
|
// Should be true except on web builds.
|
||||||
|
// Screenshots doesn't work there.
|
||||||
|
FEATURE_SCREENSHOTS.apply(this, !isWeb());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -148,10 +148,12 @@ class InitState extends FlxState
|
||||||
#if FEATURE_DEBUG_FUNCTIONS
|
#if FEATURE_DEBUG_FUNCTIONS
|
||||||
funkin.util.plugins.MemoryGCPlugin.initialize();
|
funkin.util.plugins.MemoryGCPlugin.initialize();
|
||||||
#end
|
#end
|
||||||
|
#if FEATURE_SCREENSHOTS
|
||||||
|
funkin.util.plugins.ScreenshotPlugin.initialize();
|
||||||
|
#end
|
||||||
funkin.util.plugins.EvacuateDebugPlugin.initialize();
|
funkin.util.plugins.EvacuateDebugPlugin.initialize();
|
||||||
funkin.util.plugins.ForceCrashPlugin.initialize();
|
funkin.util.plugins.ForceCrashPlugin.initialize();
|
||||||
funkin.util.plugins.ReloadAssetsDebugPlugin.initialize();
|
funkin.util.plugins.ReloadAssetsDebugPlugin.initialize();
|
||||||
funkin.util.plugins.ScreenshotPlugin.initialize();
|
|
||||||
funkin.util.plugins.VolumePlugin.initialize();
|
funkin.util.plugins.VolumePlugin.initialize();
|
||||||
funkin.util.plugins.WatchPlugin.initialize();
|
funkin.util.plugins.WatchPlugin.initialize();
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,9 @@ class Controls extends FlxActionSet
|
||||||
var _back = new FunkinAction(Action.BACK);
|
var _back = new FunkinAction(Action.BACK);
|
||||||
var _pause = new FunkinAction(Action.PAUSE);
|
var _pause = new FunkinAction(Action.PAUSE);
|
||||||
var _reset = new FunkinAction(Action.RESET);
|
var _reset = new FunkinAction(Action.RESET);
|
||||||
|
#if FEATURE_SCREENSHOTS
|
||||||
var _window_screenshot = new FunkinAction(Action.WINDOW_SCREENSHOT);
|
var _window_screenshot = new FunkinAction(Action.WINDOW_SCREENSHOT);
|
||||||
|
#end
|
||||||
var _window_fullscreen = new FunkinAction(Action.WINDOW_FULLSCREEN);
|
var _window_fullscreen = new FunkinAction(Action.WINDOW_FULLSCREEN);
|
||||||
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);
|
||||||
|
@ -67,8 +69,12 @@ class Controls extends FlxActionSet
|
||||||
var _freeplay_char_select = new FunkinAction(Action.FREEPLAY_CHAR_SELECT);
|
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);
|
||||||
|
#if FEATURE_CHART_EDITOR
|
||||||
var _debug_chart = new FunkinAction(Action.DEBUG_CHART);
|
var _debug_chart = new FunkinAction(Action.DEBUG_CHART);
|
||||||
|
#end
|
||||||
|
#if FEATURE_STAGE_EDITOR
|
||||||
var _debug_stage = new FunkinAction(Action.DEBUG_STAGE);
|
var _debug_stage = new FunkinAction(Action.DEBUG_STAGE);
|
||||||
|
#end
|
||||||
var _volume_up = new FunkinAction(Action.VOLUME_UP);
|
var _volume_up = new FunkinAction(Action.VOLUME_UP);
|
||||||
var _volume_down = new FunkinAction(Action.VOLUME_DOWN);
|
var _volume_down = new FunkinAction(Action.VOLUME_DOWN);
|
||||||
var _volume_mute = new FunkinAction(Action.VOLUME_MUTE);
|
var _volume_mute = new FunkinAction(Action.VOLUME_MUTE);
|
||||||
|
@ -243,10 +249,12 @@ class Controls extends FlxActionSet
|
||||||
inline function get_WINDOW_FULLSCREEN()
|
inline function get_WINDOW_FULLSCREEN()
|
||||||
return _window_fullscreen.check();
|
return _window_fullscreen.check();
|
||||||
|
|
||||||
|
#if FEATURE_SCREENSHOTS
|
||||||
public var WINDOW_SCREENSHOT(get, never):Bool;
|
public var WINDOW_SCREENSHOT(get, never):Bool;
|
||||||
|
|
||||||
inline function get_WINDOW_SCREENSHOT()
|
inline function get_WINDOW_SCREENSHOT()
|
||||||
return _window_screenshot.check();
|
return _window_screenshot.check();
|
||||||
|
#end
|
||||||
|
|
||||||
public var FREEPLAY_FAVORITE(get, never):Bool;
|
public var FREEPLAY_FAVORITE(get, never):Bool;
|
||||||
|
|
||||||
|
@ -278,15 +286,19 @@ class Controls extends FlxActionSet
|
||||||
inline function get_DEBUG_MENU()
|
inline function get_DEBUG_MENU()
|
||||||
return _debug_menu.check();
|
return _debug_menu.check();
|
||||||
|
|
||||||
|
#if FEATURE_CHART_EDITOR
|
||||||
public var DEBUG_CHART(get, never):Bool;
|
public var DEBUG_CHART(get, never):Bool;
|
||||||
|
|
||||||
inline function get_DEBUG_CHART()
|
inline function get_DEBUG_CHART()
|
||||||
return _debug_chart.check();
|
return _debug_chart.check();
|
||||||
|
#end
|
||||||
|
|
||||||
|
#if FEATURE_STAGE_EDITOR
|
||||||
public var DEBUG_STAGE(get, never):Bool;
|
public var DEBUG_STAGE(get, never):Bool;
|
||||||
|
|
||||||
inline function get_DEBUG_STAGE()
|
inline function get_DEBUG_STAGE()
|
||||||
return _debug_stage.check();
|
return _debug_stage.check();
|
||||||
|
#end
|
||||||
|
|
||||||
public var VOLUME_UP(get, never):Bool;
|
public var VOLUME_UP(get, never):Bool;
|
||||||
|
|
||||||
|
@ -319,7 +331,7 @@ class Controls extends FlxActionSet
|
||||||
add(_back);
|
add(_back);
|
||||||
add(_pause);
|
add(_pause);
|
||||||
add(_reset);
|
add(_reset);
|
||||||
add(_window_screenshot);
|
#if FEATURE_SCREENSHOTS add(_window_screenshot); #end
|
||||||
add(_window_fullscreen);
|
add(_window_fullscreen);
|
||||||
add(_freeplay_favorite);
|
add(_freeplay_favorite);
|
||||||
add(_freeplay_left);
|
add(_freeplay_left);
|
||||||
|
@ -327,8 +339,8 @@ class Controls extends FlxActionSet
|
||||||
add(_freeplay_char_select);
|
add(_freeplay_char_select);
|
||||||
add(_cutscene_advance);
|
add(_cutscene_advance);
|
||||||
add(_debug_menu);
|
add(_debug_menu);
|
||||||
add(_debug_chart);
|
#if FEATURE_CHART_EDITOR add(_debug_chart); #end
|
||||||
add(_debug_stage);
|
#if FEATURE_STAGE_EDITOR add(_debug_stage); #end
|
||||||
add(_volume_up);
|
add(_volume_up);
|
||||||
add(_volume_down);
|
add(_volume_down);
|
||||||
add(_volume_mute);
|
add(_volume_mute);
|
||||||
|
@ -444,7 +456,7 @@ class Controls extends FlxActionSet
|
||||||
case BACK: _back;
|
case BACK: _back;
|
||||||
case PAUSE: _pause;
|
case PAUSE: _pause;
|
||||||
case RESET: _reset;
|
case RESET: _reset;
|
||||||
case WINDOW_SCREENSHOT: _window_screenshot;
|
#if FEATURE_SCREENSHOTS case WINDOW_SCREENSHOT: _window_screenshot; #end
|
||||||
case WINDOW_FULLSCREEN: _window_fullscreen;
|
case WINDOW_FULLSCREEN: _window_fullscreen;
|
||||||
case FREEPLAY_FAVORITE: _freeplay_favorite;
|
case FREEPLAY_FAVORITE: _freeplay_favorite;
|
||||||
case FREEPLAY_LEFT: _freeplay_left;
|
case FREEPLAY_LEFT: _freeplay_left;
|
||||||
|
@ -452,8 +464,8 @@ class Controls extends FlxActionSet
|
||||||
case FREEPLAY_CHAR_SELECT: _freeplay_char_select;
|
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;
|
#if FEATURE_CHART_EDITOR case DEBUG_CHART: _debug_chart; #end
|
||||||
case DEBUG_STAGE: _debug_stage;
|
#if FEATURE_STAGE_EDITOR case DEBUG_STAGE: _debug_stage; #end
|
||||||
case VOLUME_UP: _volume_up;
|
case VOLUME_UP: _volume_up;
|
||||||
case VOLUME_DOWN: _volume_down;
|
case VOLUME_DOWN: _volume_down;
|
||||||
case VOLUME_MUTE: _volume_mute;
|
case VOLUME_MUTE: _volume_mute;
|
||||||
|
@ -516,8 +528,10 @@ class Controls extends FlxActionSet
|
||||||
func(_pause, JUST_PRESSED);
|
func(_pause, JUST_PRESSED);
|
||||||
case RESET:
|
case RESET:
|
||||||
func(_reset, JUST_PRESSED);
|
func(_reset, JUST_PRESSED);
|
||||||
|
#if FEATURE_SCREENSHOTS
|
||||||
case WINDOW_SCREENSHOT:
|
case WINDOW_SCREENSHOT:
|
||||||
func(_window_screenshot, JUST_PRESSED);
|
func(_window_screenshot, JUST_PRESSED);
|
||||||
|
#end
|
||||||
case WINDOW_FULLSCREEN:
|
case WINDOW_FULLSCREEN:
|
||||||
func(_window_fullscreen, JUST_PRESSED);
|
func(_window_fullscreen, JUST_PRESSED);
|
||||||
case FREEPLAY_FAVORITE:
|
case FREEPLAY_FAVORITE:
|
||||||
|
@ -532,10 +546,14 @@ class Controls extends FlxActionSet
|
||||||
func(_cutscene_advance, JUST_PRESSED);
|
func(_cutscene_advance, JUST_PRESSED);
|
||||||
case DEBUG_MENU:
|
case DEBUG_MENU:
|
||||||
func(_debug_menu, JUST_PRESSED);
|
func(_debug_menu, JUST_PRESSED);
|
||||||
|
#if FEATURE_CHART_EDITOR
|
||||||
case DEBUG_CHART:
|
case DEBUG_CHART:
|
||||||
func(_debug_chart, JUST_PRESSED);
|
func(_debug_chart, JUST_PRESSED);
|
||||||
|
#end
|
||||||
|
#if FEATURE_STAGE_EDITOR
|
||||||
case DEBUG_STAGE:
|
case DEBUG_STAGE:
|
||||||
func(_debug_stage, JUST_PRESSED);
|
func(_debug_stage, JUST_PRESSED);
|
||||||
|
#end
|
||||||
case VOLUME_UP:
|
case VOLUME_UP:
|
||||||
func(_volume_up, JUST_PRESSED);
|
func(_volume_up, JUST_PRESSED);
|
||||||
case VOLUME_DOWN:
|
case VOLUME_DOWN:
|
||||||
|
@ -744,7 +762,9 @@ class Controls extends FlxActionSet
|
||||||
bindKeys(Control.BACK, getDefaultKeybinds(scheme, Control.BACK));
|
bindKeys(Control.BACK, getDefaultKeybinds(scheme, Control.BACK));
|
||||||
bindKeys(Control.PAUSE, getDefaultKeybinds(scheme, Control.PAUSE));
|
bindKeys(Control.PAUSE, getDefaultKeybinds(scheme, Control.PAUSE));
|
||||||
bindKeys(Control.RESET, getDefaultKeybinds(scheme, Control.RESET));
|
bindKeys(Control.RESET, getDefaultKeybinds(scheme, Control.RESET));
|
||||||
|
#if FEATURE_SCREENSHOTS
|
||||||
bindKeys(Control.WINDOW_SCREENSHOT, getDefaultKeybinds(scheme, Control.WINDOW_SCREENSHOT));
|
bindKeys(Control.WINDOW_SCREENSHOT, getDefaultKeybinds(scheme, Control.WINDOW_SCREENSHOT));
|
||||||
|
#end
|
||||||
bindKeys(Control.WINDOW_FULLSCREEN, getDefaultKeybinds(scheme, Control.WINDOW_FULLSCREEN));
|
bindKeys(Control.WINDOW_FULLSCREEN, getDefaultKeybinds(scheme, Control.WINDOW_FULLSCREEN));
|
||||||
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));
|
||||||
|
@ -752,8 +772,12 @@ class Controls extends FlxActionSet
|
||||||
bindKeys(Control.FREEPLAY_CHAR_SELECT, getDefaultKeybinds(scheme, Control.FREEPLAY_CHAR_SELECT));
|
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));
|
||||||
|
#if FEATURE_CHART_EDITOR
|
||||||
bindKeys(Control.DEBUG_CHART, getDefaultKeybinds(scheme, Control.DEBUG_CHART));
|
bindKeys(Control.DEBUG_CHART, getDefaultKeybinds(scheme, Control.DEBUG_CHART));
|
||||||
|
#end
|
||||||
|
#if FEATURE_STAGE_EDITOR
|
||||||
bindKeys(Control.DEBUG_STAGE, getDefaultKeybinds(scheme, Control.DEBUG_STAGE));
|
bindKeys(Control.DEBUG_STAGE, getDefaultKeybinds(scheme, Control.DEBUG_STAGE));
|
||||||
|
#end
|
||||||
bindKeys(Control.VOLUME_UP, getDefaultKeybinds(scheme, Control.VOLUME_UP));
|
bindKeys(Control.VOLUME_UP, getDefaultKeybinds(scheme, Control.VOLUME_UP));
|
||||||
bindKeys(Control.VOLUME_DOWN, getDefaultKeybinds(scheme, Control.VOLUME_DOWN));
|
bindKeys(Control.VOLUME_DOWN, getDefaultKeybinds(scheme, Control.VOLUME_DOWN));
|
||||||
bindKeys(Control.VOLUME_MUTE, getDefaultKeybinds(scheme, Control.VOLUME_MUTE));
|
bindKeys(Control.VOLUME_MUTE, getDefaultKeybinds(scheme, Control.VOLUME_MUTE));
|
||||||
|
@ -781,15 +805,15 @@ class Controls extends FlxActionSet
|
||||||
case Control.PAUSE: return [P, ENTER, ESCAPE];
|
case Control.PAUSE: return [P, ENTER, ESCAPE];
|
||||||
case Control.RESET: return [R];
|
case Control.RESET: return [R];
|
||||||
case Control.WINDOW_FULLSCREEN: return [F11]; // We use F for other things LOL.
|
case Control.WINDOW_FULLSCREEN: return [F11]; // We use F for other things LOL.
|
||||||
case Control.WINDOW_SCREENSHOT: return [F3];
|
#if FEATURE_SCREENSHOTS case Control.WINDOW_SCREENSHOT: return [F3]; #end
|
||||||
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.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 [];
|
#if FEATURE_CHART_EDITOR case Control.DEBUG_CHART: return []; #end
|
||||||
case Control.DEBUG_STAGE: return [];
|
#if FEATURE_STAGE_EDITOR case Control.DEBUG_STAGE: return []; #end
|
||||||
case Control.VOLUME_UP: return [PLUS, NUMPADPLUS];
|
case Control.VOLUME_UP: return [PLUS, NUMPADPLUS];
|
||||||
case Control.VOLUME_DOWN: return [MINUS, NUMPADMINUS];
|
case Control.VOLUME_DOWN: return [MINUS, NUMPADMINUS];
|
||||||
case Control.VOLUME_MUTE: return [ZERO, NUMPADZERO];
|
case Control.VOLUME_MUTE: return [ZERO, NUMPADZERO];
|
||||||
|
@ -809,7 +833,7 @@ class Controls extends FlxActionSet
|
||||||
case Control.BACK: return [H, X];
|
case Control.BACK: return [H, X];
|
||||||
case Control.PAUSE: return [ONE];
|
case Control.PAUSE: return [ONE];
|
||||||
case Control.RESET: return [R];
|
case Control.RESET: return [R];
|
||||||
case Control.WINDOW_SCREENSHOT: return [F3];
|
#if FEATURE_SCREENSHOTS case Control.WINDOW_SCREENSHOT: return [F3]; #end
|
||||||
case Control.WINDOW_FULLSCREEN: return [F11];
|
case Control.WINDOW_FULLSCREEN: return [F11];
|
||||||
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
|
||||||
|
@ -817,8 +841,8 @@ class Controls extends FlxActionSet
|
||||||
case Control.FREEPLAY_CHAR_SELECT: return [TAB];
|
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 [];
|
#if FEATURE_CHART_EDITOR case Control.DEBUG_CHART: return []; #end
|
||||||
case Control.DEBUG_STAGE: return [];
|
#if FEATURE_STAGE_EDITOR case Control.DEBUG_STAGE: return []; #end
|
||||||
case Control.VOLUME_UP: return [PLUS];
|
case Control.VOLUME_UP: return [PLUS];
|
||||||
case Control.VOLUME_DOWN: return [MINUS];
|
case Control.VOLUME_DOWN: return [MINUS];
|
||||||
case Control.VOLUME_MUTE: return [ZERO];
|
case Control.VOLUME_MUTE: return [ZERO];
|
||||||
|
@ -838,7 +862,7 @@ class Controls extends FlxActionSet
|
||||||
case Control.BACK: return [ESCAPE];
|
case Control.BACK: return [ESCAPE];
|
||||||
case Control.PAUSE: return [ONE];
|
case Control.PAUSE: return [ONE];
|
||||||
case Control.RESET: return [R];
|
case Control.RESET: return [R];
|
||||||
case Control.WINDOW_SCREENSHOT: return [];
|
#if FEATURE_SCREENSHOTS case Control.WINDOW_SCREENSHOT: return []; #end
|
||||||
case Control.WINDOW_FULLSCREEN: return [];
|
case Control.WINDOW_FULLSCREEN: return [];
|
||||||
case Control.FREEPLAY_FAVORITE: return [];
|
case Control.FREEPLAY_FAVORITE: return [];
|
||||||
case Control.FREEPLAY_LEFT: return [];
|
case Control.FREEPLAY_LEFT: return [];
|
||||||
|
@ -846,8 +870,8 @@ class Controls extends FlxActionSet
|
||||||
case Control.FREEPLAY_CHAR_SELECT: 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 [];
|
#if FEATURE_CHART_EDITOR case Control.DEBUG_CHART: return []; #end
|
||||||
case Control.DEBUG_STAGE: return [];
|
#if FEATURE_STAGE_EDITOR case Control.DEBUG_STAGE: return []; #end
|
||||||
case Control.VOLUME_UP: return [NUMPADPLUS];
|
case Control.VOLUME_UP: return [NUMPADPLUS];
|
||||||
case Control.VOLUME_DOWN: return [NUMPADMINUS];
|
case Control.VOLUME_DOWN: return [NUMPADMINUS];
|
||||||
case Control.VOLUME_MUTE: return [NUMPADZERO];
|
case Control.VOLUME_MUTE: return [NUMPADZERO];
|
||||||
|
@ -952,7 +976,9 @@ class Controls extends FlxActionSet
|
||||||
Control.PAUSE => getDefaultGamepadBinds(Control.PAUSE),
|
Control.PAUSE => getDefaultGamepadBinds(Control.PAUSE),
|
||||||
Control.RESET => getDefaultGamepadBinds(Control.RESET),
|
Control.RESET => getDefaultGamepadBinds(Control.RESET),
|
||||||
Control.WINDOW_FULLSCREEN => getDefaultGamepadBinds(Control.WINDOW_FULLSCREEN),
|
Control.WINDOW_FULLSCREEN => getDefaultGamepadBinds(Control.WINDOW_FULLSCREEN),
|
||||||
|
#if FEATURE_SCREENSHOTS
|
||||||
Control.WINDOW_SCREENSHOT => getDefaultGamepadBinds(Control.WINDOW_SCREENSHOT),
|
Control.WINDOW_SCREENSHOT => getDefaultGamepadBinds(Control.WINDOW_SCREENSHOT),
|
||||||
|
#end
|
||||||
Control.CUTSCENE_ADVANCE => getDefaultGamepadBinds(Control.CUTSCENE_ADVANCE),
|
Control.CUTSCENE_ADVANCE => getDefaultGamepadBinds(Control.CUTSCENE_ADVANCE),
|
||||||
Control.FREEPLAY_FAVORITE => getDefaultGamepadBinds(Control.FREEPLAY_FAVORITE),
|
Control.FREEPLAY_FAVORITE => getDefaultGamepadBinds(Control.FREEPLAY_FAVORITE),
|
||||||
Control.FREEPLAY_LEFT => getDefaultGamepadBinds(Control.FREEPLAY_LEFT),
|
Control.FREEPLAY_LEFT => getDefaultGamepadBinds(Control.FREEPLAY_LEFT),
|
||||||
|
@ -961,8 +987,12 @@ class Controls extends FlxActionSet
|
||||||
Control.VOLUME_DOWN => getDefaultGamepadBinds(Control.VOLUME_DOWN),
|
Control.VOLUME_DOWN => getDefaultGamepadBinds(Control.VOLUME_DOWN),
|
||||||
Control.VOLUME_MUTE => getDefaultGamepadBinds(Control.VOLUME_MUTE),
|
Control.VOLUME_MUTE => getDefaultGamepadBinds(Control.VOLUME_MUTE),
|
||||||
Control.DEBUG_MENU => getDefaultGamepadBinds(Control.DEBUG_MENU),
|
Control.DEBUG_MENU => getDefaultGamepadBinds(Control.DEBUG_MENU),
|
||||||
|
#if FEATURE_CHART_EDITOR
|
||||||
Control.DEBUG_CHART => getDefaultGamepadBinds(Control.DEBUG_CHART),
|
Control.DEBUG_CHART => getDefaultGamepadBinds(Control.DEBUG_CHART),
|
||||||
|
#end
|
||||||
|
#if FEATURE_STAGE_EDITOR
|
||||||
Control.DEBUG_STAGE => getDefaultGamepadBinds(Control.DEBUG_STAGE),
|
Control.DEBUG_STAGE => getDefaultGamepadBinds(Control.DEBUG_STAGE),
|
||||||
|
#end
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -996,8 +1026,10 @@ class Controls extends FlxActionSet
|
||||||
return [FlxGamepadInputID.BACK]; // Back (i.e. Select)
|
return [FlxGamepadInputID.BACK]; // Back (i.e. Select)
|
||||||
case Control.WINDOW_FULLSCREEN:
|
case Control.WINDOW_FULLSCREEN:
|
||||||
[];
|
[];
|
||||||
|
#if FEATURE_SCREENSHOTS
|
||||||
case Control.WINDOW_SCREENSHOT:
|
case Control.WINDOW_SCREENSHOT:
|
||||||
[];
|
[];
|
||||||
|
#end
|
||||||
case Control.CUTSCENE_ADVANCE:
|
case Control.CUTSCENE_ADVANCE:
|
||||||
return [A];
|
return [A];
|
||||||
case Control.FREEPLAY_FAVORITE:
|
case Control.FREEPLAY_FAVORITE:
|
||||||
|
@ -1014,10 +1046,14 @@ class Controls extends FlxActionSet
|
||||||
[];
|
[];
|
||||||
case Control.DEBUG_MENU:
|
case Control.DEBUG_MENU:
|
||||||
[];
|
[];
|
||||||
|
#if FEATURE_CHART_EDITOR
|
||||||
case Control.DEBUG_CHART:
|
case Control.DEBUG_CHART:
|
||||||
[];
|
[];
|
||||||
|
#end
|
||||||
|
#if FEATURE_STAGE_EDITOR
|
||||||
case Control.DEBUG_STAGE:
|
case Control.DEBUG_STAGE:
|
||||||
[];
|
[];
|
||||||
|
#end
|
||||||
default:
|
default:
|
||||||
// Fallthrough.
|
// Fallthrough.
|
||||||
}
|
}
|
||||||
|
@ -1582,7 +1618,7 @@ enum Control
|
||||||
FREEPLAY_RIGHT;
|
FREEPLAY_RIGHT;
|
||||||
FREEPLAY_CHAR_SELECT;
|
FREEPLAY_CHAR_SELECT;
|
||||||
// WINDOW
|
// WINDOW
|
||||||
WINDOW_SCREENSHOT;
|
#if FEATURE_SCREENSHOTS WINDOW_SCREENSHOT; #end
|
||||||
WINDOW_FULLSCREEN;
|
WINDOW_FULLSCREEN;
|
||||||
// VOLUME
|
// VOLUME
|
||||||
VOLUME_UP;
|
VOLUME_UP;
|
||||||
|
@ -1590,8 +1626,8 @@ enum Control
|
||||||
VOLUME_MUTE;
|
VOLUME_MUTE;
|
||||||
// DEBUG
|
// DEBUG
|
||||||
DEBUG_MENU;
|
DEBUG_MENU;
|
||||||
DEBUG_CHART;
|
#if FEATURE_CHART_EDITOR DEBUG_CHART; #end
|
||||||
DEBUG_STAGE;
|
#if FEATURE_STAGE_EDITOR DEBUG_STAGE; #end
|
||||||
}
|
}
|
||||||
|
|
||||||
enum abstract Action(String) to String from String
|
enum abstract Action(String) to String from String
|
||||||
|
@ -1628,7 +1664,9 @@ enum abstract Action(String) to String from String
|
||||||
var RESET = "reset";
|
var RESET = "reset";
|
||||||
// WINDOW
|
// WINDOW
|
||||||
var WINDOW_FULLSCREEN = "window_fullscreen";
|
var WINDOW_FULLSCREEN = "window_fullscreen";
|
||||||
|
#if FEATURE_SCREENSHOTS
|
||||||
var WINDOW_SCREENSHOT = "window_screenshot";
|
var WINDOW_SCREENSHOT = "window_screenshot";
|
||||||
|
#end
|
||||||
// CUTSCENE
|
// CUTSCENE
|
||||||
var CUTSCENE_ADVANCE = "cutscene_advance";
|
var CUTSCENE_ADVANCE = "cutscene_advance";
|
||||||
// FREEPLAY
|
// FREEPLAY
|
||||||
|
@ -1642,8 +1680,12 @@ enum abstract Action(String) to String from String
|
||||||
var VOLUME_MUTE = "volume_mute";
|
var VOLUME_MUTE = "volume_mute";
|
||||||
// DEBUG
|
// DEBUG
|
||||||
var DEBUG_MENU = "debug_menu";
|
var DEBUG_MENU = "debug_menu";
|
||||||
|
#if FEATURE_CHART_EDITOR
|
||||||
var DEBUG_CHART = "debug_chart";
|
var DEBUG_CHART = "debug_chart";
|
||||||
|
#end
|
||||||
|
#if FEATURE_STAGE_EDITOR
|
||||||
var DEBUG_STAGE = "debug_stage";
|
var DEBUG_STAGE = "debug_stage";
|
||||||
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Device
|
enum Device
|
||||||
|
|
|
@ -2581,7 +2581,7 @@ class PlayState extends MusicBeatSubState
|
||||||
*/
|
*/
|
||||||
function debugKeyShit():Void
|
function debugKeyShit():Void
|
||||||
{
|
{
|
||||||
#if FEATURE_CHART_EDITOR
|
#if FEATURE_STAGE_EDITOR
|
||||||
// Open the stage editor overlaying the current state.
|
// Open the stage editor overlaying the current state.
|
||||||
if (controls.DEBUG_STAGE)
|
if (controls.DEBUG_STAGE)
|
||||||
{
|
{
|
||||||
|
@ -2590,7 +2590,9 @@ class PlayState extends MusicBeatSubState
|
||||||
persistentUpdate = false;
|
persistentUpdate = false;
|
||||||
openSubState(new StageOffsetSubState());
|
openSubState(new StageOffsetSubState());
|
||||||
}
|
}
|
||||||
|
#end
|
||||||
|
|
||||||
|
#if FEATURE_CHART_EDITOR
|
||||||
// Redirect to the chart editor playing the current song.
|
// Redirect to the chart editor playing the current song.
|
||||||
if (controls.DEBUG_CHART)
|
if (controls.DEBUG_CHART)
|
||||||
{
|
{
|
||||||
|
@ -2598,6 +2600,7 @@ class PlayState extends MusicBeatSubState
|
||||||
persistentUpdate = false;
|
persistentUpdate = false;
|
||||||
if (isChartingMode)
|
if (isChartingMode)
|
||||||
{
|
{
|
||||||
|
// Close the playtest substate.
|
||||||
FlxG.sound.music?.pause();
|
FlxG.sound.music?.pause();
|
||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,10 +28,14 @@ class ControlsMenu extends funkin.ui.options.OptionsState.Page
|
||||||
[NOTE_UP, NOTE_DOWN, NOTE_LEFT, NOTE_RIGHT],
|
[NOTE_UP, NOTE_DOWN, NOTE_LEFT, NOTE_RIGHT],
|
||||||
[UI_UP, UI_DOWN, UI_LEFT, UI_RIGHT, ACCEPT, BACK],
|
[UI_UP, UI_DOWN, UI_LEFT, UI_RIGHT, ACCEPT, BACK],
|
||||||
[CUTSCENE_ADVANCE],
|
[CUTSCENE_ADVANCE],
|
||||||
[FREEPLAY_FAVORITE, FREEPLAY_LEFT, FREEPLAY_RIGHT],
|
[FREEPLAY_FAVORITE, FREEPLAY_LEFT, FREEPLAY_RIGHT, FREEPLAY_CHAR_SELECT],
|
||||||
[WINDOW_FULLSCREEN, WINDOW_SCREENSHOT],
|
[WINDOW_FULLSCREEN, #if FEATURE_SCREENSHOTS WINDOW_SCREENSHOT, #end],
|
||||||
[VOLUME_UP, VOLUME_DOWN, VOLUME_MUTE],
|
[VOLUME_UP, VOLUME_DOWN, VOLUME_MUTE],
|
||||||
[DEBUG_MENU, DEBUG_CHART]
|
[
|
||||||
|
DEBUG_MENU,
|
||||||
|
#if FEATURE_CHART_EDITOR DEBUG_CHART, #end
|
||||||
|
#if FEATURE_STAGE_EDITOR DEBUG_STAGE, #end
|
||||||
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
var itemGroups:Array<Array<InputItem>> = [for (i in 0...controlGroups.length) []];
|
var itemGroups:Array<Array<InputItem>> = [for (i in 0...controlGroups.length) []];
|
||||||
|
@ -137,7 +141,8 @@ class ControlsMenu extends funkin.ui.options.OptionsState.Page
|
||||||
|
|
||||||
if (currentHeader != null && name.indexOf(currentHeader) == 0) name = name.substr(currentHeader.length);
|
if (currentHeader != null && name.indexOf(currentHeader) == 0) name = name.substr(currentHeader.length);
|
||||||
|
|
||||||
var label = labels.add(new AtlasText(100, y, name, AtlasFont.BOLD));
|
var formatName = name.replace('_', ' ');
|
||||||
|
var label = labels.add(new AtlasText(100, y, formatName, AtlasFont.BOLD));
|
||||||
label.alpha = 0.6;
|
label.alpha = 0.6;
|
||||||
for (i in 0...COLUMNS)
|
for (i in 0...COLUMNS)
|
||||||
createItem(label.x + 550 + i * 400, y, control, i);
|
createItem(label.x + 550 + i * 400, y, control, i);
|
||||||
|
|
|
@ -103,7 +103,11 @@ class ScreenshotPlugin extends FlxBasic
|
||||||
|
|
||||||
public function hasPressedScreenshot():Bool
|
public function hasPressedScreenshot():Bool
|
||||||
{
|
{
|
||||||
|
#if FEATURE_SCREENSHOTS
|
||||||
return PlayerSettings.player1.controls.WINDOW_SCREENSHOT;
|
return PlayerSettings.player1.controls.WINDOW_SCREENSHOT;
|
||||||
|
#else
|
||||||
|
return false;
|
||||||
|
#end
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updatePreferences():Void
|
public function updatePreferences():Void
|
||||||
|
|
Loading…
Reference in a new issue