mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-05-23 23:52:51 +00:00
Merge pull request #385 from FunkinCrew/feature/debugger-popup-fixes
Debugger popup fixes
This commit is contained in:
commit
59752f0d9a
2
.github/workflows/build-shit.yml
vendored
2
.github/workflows/build-shit.yml
vendored
|
@ -77,7 +77,7 @@ jobs:
|
||||||
key: ${{ runner.os }}-build-win-${{ github.ref_name }}
|
key: ${{ runner.os }}-build-win-${{ github.ref_name }}
|
||||||
- name: Build game
|
- name: Build game
|
||||||
run: |
|
run: |
|
||||||
haxelib run lime build windows -v -release -DNO_REDIRECT_ASSETS_FOLDER -DGITHUB_BUILD
|
haxelib run lime build windows -v -release -DGITHUB_BUILD
|
||||||
env:
|
env:
|
||||||
HXCPP_COMPILE_CACHE: "${{ runner.temp }}\\hxcpp_cache"
|
HXCPP_COMPILE_CACHE: "${{ runner.temp }}\\hxcpp_cache"
|
||||||
- name: Upload build artifacts
|
- name: Upload build artifacts
|
||||||
|
|
|
@ -194,7 +194,7 @@
|
||||||
<!-- Uncomment this to wipe your input settings. -->
|
<!-- Uncomment this to wipe your input settings. -->
|
||||||
<!-- <haxedef name="CLEAR_INPUT_SAVE"/> -->
|
<!-- <haxedef name="CLEAR_INPUT_SAVE"/> -->
|
||||||
|
|
||||||
<section if="debug" unless="NO_REDIRECT_ASSETS_FOLDER || html5">
|
<section if="debug" unless="NO_REDIRECT_ASSETS_FOLDER || html5 || GITHUB_BUILD">
|
||||||
<!--
|
<!--
|
||||||
Use the parent assets folder rather than the exported one
|
Use the parent assets folder rather than the exported one
|
||||||
No more will we accidentally undo our changes!
|
No more will we accidentally undo our changes!
|
||||||
|
|
2
assets
2
assets
|
@ -1 +1 @@
|
||||||
Subproject commit f070c4a08fd634dfeb0bdf1fd03579614441722c
|
Subproject commit 2599e1b6b039886df62c4d0d19aa14b23708eccd
|
|
@ -90,69 +90,7 @@ class InitState extends FlxState
|
||||||
// Set the game to a lower frame rate while it is in the background.
|
// Set the game to a lower frame rate while it is in the background.
|
||||||
FlxG.game.focusLostFramerate = 30;
|
FlxG.game.focusLostFramerate = 30;
|
||||||
|
|
||||||
//
|
setupFlixelDebug();
|
||||||
// FLIXEL DEBUG SETUP
|
|
||||||
//
|
|
||||||
#if (debug || FORCE_DEBUG_VERSION)
|
|
||||||
// Disable using ~ to open the console (we use that for the Editor menu)
|
|
||||||
FlxG.debugger.toggleKeys = [F2];
|
|
||||||
TrackerUtil.initTrackers();
|
|
||||||
// Adds an additional Close Debugger button.
|
|
||||||
// This big obnoxious white button is for MOBILE, so that you can press it
|
|
||||||
// easily with your finger when debug bullshit pops up during testing lol!
|
|
||||||
FlxG.debugger.addButton(LEFT, new BitmapData(200, 200), function() {
|
|
||||||
FlxG.debugger.visible = false;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Adds a red button to the debugger.
|
|
||||||
// This pauses the game AND the music! This ensures the Conductor stops.
|
|
||||||
FlxG.debugger.addButton(CENTER, new BitmapData(20, 20, true, 0xFFCC2233), function() {
|
|
||||||
if (FlxG.vcr.paused)
|
|
||||||
{
|
|
||||||
FlxG.vcr.resume();
|
|
||||||
|
|
||||||
for (snd in FlxG.sound.list)
|
|
||||||
{
|
|
||||||
snd.resume();
|
|
||||||
}
|
|
||||||
|
|
||||||
FlxG.sound.music.resume();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
FlxG.vcr.pause();
|
|
||||||
|
|
||||||
for (snd in FlxG.sound.list)
|
|
||||||
{
|
|
||||||
snd.pause();
|
|
||||||
}
|
|
||||||
|
|
||||||
FlxG.sound.music.pause();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Adds a blue button to the debugger.
|
|
||||||
// This skips forward in the song.
|
|
||||||
FlxG.debugger.addButton(CENTER, new BitmapData(20, 20, true, 0xFF2222CC), function() {
|
|
||||||
FlxG.game.debugger.vcr.onStep();
|
|
||||||
|
|
||||||
for (snd in FlxG.sound.list)
|
|
||||||
{
|
|
||||||
snd.pause();
|
|
||||||
snd.time += FlxG.elapsed * 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
FlxG.sound.music.pause();
|
|
||||||
FlxG.sound.music.time += FlxG.elapsed * 1000;
|
|
||||||
});
|
|
||||||
#end
|
|
||||||
|
|
||||||
// Make errors and warnings less annoying.
|
|
||||||
// Forcing this always since I have never been happy to have the debugger to pop up
|
|
||||||
LogStyle.ERROR.openConsole = false;
|
|
||||||
LogStyle.ERROR.errorSound = null;
|
|
||||||
LogStyle.WARNING.openConsole = false;
|
|
||||||
LogStyle.WARNING.errorSound = null;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// FLIXEL TRANSITIONS
|
// FLIXEL TRANSITIONS
|
||||||
|
@ -349,6 +287,80 @@ class InitState extends FlxState
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setupFlixelDebug():Void
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// FLIXEL DEBUG SETUP
|
||||||
|
//
|
||||||
|
#if (debug || FORCE_DEBUG_VERSION)
|
||||||
|
// Make errors and warnings less annoying.
|
||||||
|
// Forcing this always since I have never been happy to have the debugger to pop up
|
||||||
|
LogStyle.ERROR.openConsole = false;
|
||||||
|
LogStyle.ERROR.errorSound = null;
|
||||||
|
LogStyle.WARNING.openConsole = false;
|
||||||
|
LogStyle.WARNING.errorSound = null;
|
||||||
|
|
||||||
|
// Disable using ~ to open the console (we use that for the Editor menu)
|
||||||
|
FlxG.debugger.toggleKeys = [F2];
|
||||||
|
TrackerUtil.initTrackers();
|
||||||
|
// Adds an additional Close Debugger button.
|
||||||
|
// This big obnoxious white button is for MOBILE, so that you can press it
|
||||||
|
// easily with your finger when debug bullshit pops up during testing lol!
|
||||||
|
FlxG.debugger.addButton(LEFT, new BitmapData(200, 200), function() {
|
||||||
|
FlxG.debugger.visible = false;
|
||||||
|
|
||||||
|
// Make errors and warnings less annoying.
|
||||||
|
// Forcing this always since I have never been happy to have the debugger to pop up
|
||||||
|
LogStyle.ERROR.openConsole = false;
|
||||||
|
LogStyle.ERROR.errorSound = null;
|
||||||
|
LogStyle.WARNING.openConsole = false;
|
||||||
|
LogStyle.WARNING.errorSound = null;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Adds a red button to the debugger.
|
||||||
|
// This pauses the game AND the music! This ensures the Conductor stops.
|
||||||
|
FlxG.debugger.addButton(CENTER, new BitmapData(20, 20, true, 0xFFCC2233), function() {
|
||||||
|
if (FlxG.vcr.paused)
|
||||||
|
{
|
||||||
|
FlxG.vcr.resume();
|
||||||
|
|
||||||
|
for (snd in FlxG.sound.list)
|
||||||
|
{
|
||||||
|
snd.resume();
|
||||||
|
}
|
||||||
|
|
||||||
|
FlxG.sound.music.resume();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FlxG.vcr.pause();
|
||||||
|
|
||||||
|
for (snd in FlxG.sound.list)
|
||||||
|
{
|
||||||
|
snd.pause();
|
||||||
|
}
|
||||||
|
|
||||||
|
FlxG.sound.music.pause();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Adds a blue button to the debugger.
|
||||||
|
// This skips forward in the song.
|
||||||
|
FlxG.debugger.addButton(CENTER, new BitmapData(20, 20, true, 0xFF2222CC), function() {
|
||||||
|
FlxG.game.debugger.vcr.onStep();
|
||||||
|
|
||||||
|
for (snd in FlxG.sound.list)
|
||||||
|
{
|
||||||
|
snd.pause();
|
||||||
|
snd.time += FlxG.elapsed * 1000;
|
||||||
|
}
|
||||||
|
|
||||||
|
FlxG.sound.music.pause();
|
||||||
|
FlxG.sound.music.time += FlxG.elapsed * 1000;
|
||||||
|
});
|
||||||
|
#end
|
||||||
|
}
|
||||||
|
|
||||||
function defineSong():String
|
function defineSong():String
|
||||||
{
|
{
|
||||||
return MacroUtil.getDefine('SONG');
|
return MacroUtil.getDefine('SONG');
|
||||||
|
|
|
@ -597,11 +597,6 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||||
*/
|
*/
|
||||||
var playtestBotPlayMode:Bool = false;
|
var playtestBotPlayMode:Bool = false;
|
||||||
|
|
||||||
/**
|
|
||||||
* Enables or disables the "debugger" popup that appears when you run into a flixel error.
|
|
||||||
*/
|
|
||||||
var enabledDebuggerPopup:Bool = true;
|
|
||||||
|
|
||||||
// Visuals
|
// Visuals
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -5328,9 +5323,6 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LogStyle.WARNING.openConsole = enabledDebuggerPopup;
|
|
||||||
LogStyle.ERROR.openConsole = enabledDebuggerPopup;
|
|
||||||
|
|
||||||
// TODO: Rework asset system so we can remove this.
|
// TODO: Rework asset system so we can remove this.
|
||||||
switch (currentSongStage)
|
switch (currentSongStage)
|
||||||
{
|
{
|
||||||
|
|
|
@ -308,16 +308,6 @@ class ChartEditorToolboxHandler
|
||||||
state.playtestBotPlayMode = checkboxBotPlay.selected;
|
state.playtestBotPlayMode = checkboxBotPlay.selected;
|
||||||
};
|
};
|
||||||
|
|
||||||
var checkboxDebugger:Null<CheckBox> = toolbox.findComponent('playtestDebuggerCheckbox', CheckBox);
|
|
||||||
|
|
||||||
if (checkboxDebugger == null) throw 'ChartEditorToolboxHandler.buildToolboxPlaytestPropertiesLayout() - Could not find playtestDebuggerCheckbox component.';
|
|
||||||
|
|
||||||
state.enabledDebuggerPopup = checkboxDebugger.selected;
|
|
||||||
|
|
||||||
checkboxDebugger.onClick = _ -> {
|
|
||||||
state.enabledDebuggerPopup = checkboxDebugger.selected;
|
|
||||||
};
|
|
||||||
|
|
||||||
return toolbox;
|
return toolbox;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue