Adjust graphs width.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user