diff --git a/source/funkin/play/notes/SustainTrail.hx b/source/funkin/play/notes/SustainTrail.hx index ab4bf5f16..7367b97af 100644 --- a/source/funkin/play/notes/SustainTrail.hx +++ b/source/funkin/play/notes/SustainTrail.hx @@ -149,9 +149,9 @@ class SustainTrail extends FlxSprite if (sustainLength == s) return s; height = sustainHeight(s, getScrollSpeed()); - // updateColorTransform(); + this.sustainLength = s; updateClipping(); - return sustainLength = s; + return this.sustainLength; } /** @@ -162,13 +162,15 @@ class SustainTrail extends FlxSprite public function updateClipping(songTime:Float = 0):Void { var clipHeight:Float = FlxMath.bound(sustainHeight(sustainLength - (songTime - strumTime), getScrollSpeed()), 0, height); - if (clipHeight == 0) + if (clipHeight <= 0.1) { visible = false; return; } else + { visible = true; + } var bottomHeight:Float = graphic.height * zoom * endOffset; var partHeight:Float = clipHeight - bottomHeight; diff --git a/source/funkin/ui/debug/charting/ChartEditorState.hx b/source/funkin/ui/debug/charting/ChartEditorState.hx index 203bd1508..4f96fad69 100644 --- a/source/funkin/ui/debug/charting/ChartEditorState.hx +++ b/source/funkin/ui/debug/charting/ChartEditorState.hx @@ -124,6 +124,7 @@ import flixel.group.FlxGroup.FlxTypedGroup; import funkin.audio.visualize.PolygonVisGroup; import flixel.input.mouse.FlxMouseEvent; import flixel.text.FlxText; +import flixel.system.debug.log.LogStyle; using Lambda; @@ -544,6 +545,11 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState */ var playtestPracticeMode:Bool = false; + /** + * Enables or disables the "debugger" popup that appears when you run into a flixel error. + */ + var enabledDebuggerPopup:Bool = true; + // Visuals /** @@ -4808,6 +4814,9 @@ class ChartEditorState extends UIState // UIState derives from MusicBeatState return; } + LogStyle.WARNING.openConsole = enabledDebuggerPopup; + LogStyle.ERROR.openConsole = enabledDebuggerPopup; + // TODO: Rework asset system so we can remove this. switch (currentSongStage) { diff --git a/source/funkin/ui/debug/charting/handlers/ChartEditorToolboxHandler.hx b/source/funkin/ui/debug/charting/handlers/ChartEditorToolboxHandler.hx index a9a9c375d..98d04887d 100644 --- a/source/funkin/ui/debug/charting/handlers/ChartEditorToolboxHandler.hx +++ b/source/funkin/ui/debug/charting/handlers/ChartEditorToolboxHandler.hx @@ -488,6 +488,16 @@ class ChartEditorToolboxHandler state.playtestStartTime = checkboxStartTime.selected; }; + var checkboxDebugger:Null = 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; }