1
0
Fork 0
mirror of https://github.com/ninjamuffin99/Funkin.git synced 2024-09-30 22:38:58 +00:00

Debugger popup fixes

This commit is contained in:
EliteMasterEric 2024-03-12 17:57:52 -04:00
parent ee35bf3044
commit bbaf8dfb3e
5 changed files with 78 additions and 74 deletions

View file

@ -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

View file

@ -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

@ -1 +1 @@
Subproject commit fe8c987eb846ceb73b8518879b506111aaccdf80 Subproject commit 221667bc207c5c59896f0b8fdf74260be8efd630

View file

@ -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');

View file

@ -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)
{ {