diff options
Diffstat (limited to 'src/main/java/me/Danker/gui/SkillTrackerGui.java')
-rw-r--r-- | src/main/java/me/Danker/gui/SkillTrackerGui.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/me/Danker/gui/SkillTrackerGui.java b/src/main/java/me/Danker/gui/SkillTrackerGui.java index fb7a7c9..e77f785 100644 --- a/src/main/java/me/Danker/gui/SkillTrackerGui.java +++ b/src/main/java/me/Danker/gui/SkillTrackerGui.java @@ -1,9 +1,8 @@ package me.Danker.gui; -import me.Danker.DankersSkyblockMod; import me.Danker.features.SkillTracker; import me.Danker.handlers.ConfigHandler; -import me.Danker.handlers.TextRenderer; +import me.Danker.utils.RenderUtils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; @@ -50,6 +49,7 @@ public class SkillTrackerGui extends GuiScreen { @Override public void drawScreen(int mouseX, int mouseY, float partialTicks) { this.drawDefaultBackground(); + String stateText = ""; if (SkillTracker.skillStopwatch.isStarted() && !SkillTracker.skillStopwatch.isSuspended()) { stateText = "Timer: Running"; @@ -59,15 +59,15 @@ public class SkillTrackerGui extends GuiScreen { if (!SkillTracker.showSkillTracker) { stateText += " (Hidden)"; } - int stateTextWidth = mc.fontRendererObj.getStringWidth(stateText); - new TextRenderer(mc, stateText, width / 2 - stateTextWidth / 2, 10, 1D); + RenderUtils.drawCenteredText(stateText, width, 10, 1D); + super.drawScreen(mouseX, mouseY, partialTicks); } @Override public void actionPerformed(GuiButton button) { if (button == goBack) { - DankersSkyblockMod.guiToOpen = "dankergui1"; + mc.displayGuiScreen(new DankerGui(1, "")); } else if (button == start) { if (SkillTracker.skillStopwatch.isStarted() && SkillTracker.skillStopwatch.isSuspended()) { SkillTracker.skillStopwatch.resume(); |