Fixed FPS graph and new debug lines not being rendered in Debug screen. Closes #3054

This commit is contained in:
LexManos committed 2016-07-01 13:53:26 -07:00
1 parent 03b54774aa
commit f58d1cae1a
3 files changed
+30 -4

No files matched your search

@@ -169,6 +169,7 @@ public class GuiIngameForge extends GuiIngame
renderToolHighlight(res);
renderHUDText(width, height);
renderFPSGraph();
renderPotionIcons(res);
renderRecordOverlay(width, height, partialTicks);
renderSubtitles(res);
@@ -717,6 +718,15 @@ public class GuiIngameForge extends GuiIngame
post(TEXT);
}
protected void renderFPSGraph()
{
if (this.mc.gameSettings.showDebugInfo && this.mc.gameSettings.showLagometer && !pre(FPS_GRAPH))
{
this.debugOverlay.renderLagometer();
post(FPS_GRAPH);
}
}
protected void renderRecordOverlay(int width, int height, float partialTicks)
{
if (recordPlayingUpFor > 0)
@@ -884,10 +894,22 @@ public class GuiIngameForge extends GuiIngame
private class GuiOverlayDebugForge extends GuiOverlayDebug
{
private GuiOverlayDebugForge(Minecraft mc){ super(mc); }
private Minecraft mc;
private GuiOverlayDebugForge(Minecraft mc)
{
super(mc);
this.mc = mc;
}
@Override protected void renderDebugInfoLeft(){}
@Override protected void renderDebugInfoRight(ScaledResolution res){}
private List<String> getLeft(){ return this.call(); }
private List<String> getLeft()
{
List<String> ret = this.call();
ret.add("");
ret.add("Debug: Pie [shift]: " + (this.mc.gameSettings.showDebugProfilerChart ? "visible" : "hidden") + " FPS [alt]: " + (this.mc.gameSettings.showLagometer ? "visible" : "hidden"));
ret.add("For help: press F3 + Q");
return ret;
}
private List<String> getRight(){ return this.getDebugInfoRight(); }
}
}
@@ -66,7 +66,8 @@ public class RenderGameOverlayEvent extends Event
PLAYER_LIST,
DEBUG,
POTION_ICONS,
SUBTITLES
SUBTITLES,
FPS_GRAPH
}
private final float partialTicks;