From 477f85a71eee2ee272de9e6cabae86590f4031ad Mon Sep 17 00:00:00 2001 From: MAJigsaw77 <77043862+MAJigsaw77@users.noreply.github.com> Date: Sun, 7 Sep 2025 12:49:24 +0300 Subject: [PATCH] Adjust graphs width. --- source/funkin/ui/debug/FunkinDebugDisplay.hx | 10 +++++++--- source/funkin/ui/debug/stats/FunkinStatsGraph.hx | 8 ++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/source/funkin/ui/debug/FunkinDebugDisplay.hx b/source/funkin/ui/debug/FunkinDebugDisplay.hx index d84303042..3dfe584b4 100644 --- a/source/funkin/ui/debug/FunkinDebugDisplay.hx +++ b/source/funkin/ui/debug/FunkinDebugDisplay.hx @@ -62,18 +62,22 @@ class FunkinDebugDisplay extends Sprite background.graphics.endFill(); addChild(background); - fpsGraph = new FunkinStatsGraph(OTHERS_OFFSET, OTHERS_OFFSET + 22, 100, 25, color); + final graphsWidth:Int = OUTER_RECT_DIMENSIONS[0] + (INNER_RECT_DIFF * 2) - (OTHERS_OFFSET * 3); + final graphsHeight:Int = 25; + + fpsGraph = new FunkinStatsGraph(OTHERS_OFFSET, OTHERS_OFFSET + 22, graphsWidth, graphsHeight, color); fpsGraph.minValue = 0; addChild(fpsGraph); #if !html5 - gcMemGraph = new FunkinStatsGraph(OTHERS_OFFSET, Math.floor(OTHERS_OFFSET + (fpsGraph.y + fpsGraph.axisHeight) + 22), 100, 25, color); + gcMemGraph = new FunkinStatsGraph(OTHERS_OFFSET, Math.floor(OTHERS_OFFSET + (fpsGraph.y + fpsGraph.axisHeight) + 22), graphsWidth, graphsHeight, color); gcMemGraph.minValue = 0; addChild(gcMemGraph); if (MemoryUtil.supportsTaskMem()) { - taskMemGraph = new FunkinStatsGraph(OTHERS_OFFSET, Math.floor(OTHERS_OFFSET + (gcMemGraph.y + gcMemGraph.axisHeight) + 22), 100, 25, color); + taskMemGraph = new FunkinStatsGraph(OTHERS_OFFSET, Math.floor(OTHERS_OFFSET + (gcMemGraph.y + gcMemGraph.axisHeight) + 22), graphsWidth, graphsHeight, + color); taskMemGraph.minValue = 0; addChild(taskMemGraph); } diff --git a/source/funkin/ui/debug/stats/FunkinStatsGraph.hx b/source/funkin/ui/debug/stats/FunkinStatsGraph.hx index bd7ba1494..5eac2ef65 100644 --- a/source/funkin/ui/debug/stats/FunkinStatsGraph.hx +++ b/source/funkin/ui/debug/stats/FunkinStatsGraph.hx @@ -60,18 +60,22 @@ class FunkinStatsGraph extends Sprite function drawAxes():Void { axis.graphics.clear(); + axis.graphics.lineStyle(1, AXIS_COLOR, AXIS_ALPHA, false, null, null, MITER, 255); axis.graphics.moveTo(0, 0); + axis.graphics.lineTo(0, axisHeight); axis.graphics.moveTo(0, axisHeight); + axis.graphics.lineTo(axisWidth, axisHeight); } function drawGraph():Void { graphics.clear(); + graphics.lineStyle(1, graphColor, 1, false, null, null, MITER, 255); if (history.length == 0) @@ -87,9 +91,9 @@ class FunkinStatsGraph extends Sprite { final pointY:Float = axisHeight - ((history[i] - minValue) * scale) - 1; - if (i == 0) graphics.moveTo(axis.x + 1, pointY); + if (i == 0) graphics.moveTo(axis.x, pointY); - graphics.lineTo(axis.x + 1 + (i * inc), pointY); + graphics.lineTo(axis.x + (i * inc), pointY); } }