diff options
author | bowser0000 <bowser0000@gmail.com> | 2022-03-04 13:20:20 -0500 |
---|---|---|
committer | bowser0000 <bowser0000@gmail.com> | 2022-03-04 13:20:20 -0500 |
commit | 2b57ccad6d21b325c3164117fe14e00e13399a7c (patch) | |
tree | ba0d560ed179fa3eb412996ac55ea3c920c2d88d /src/main/java/me/Danker/gui/DankerGui.java | |
parent | 42b556c49db4d848cddca76b383135dcdaad99fa (diff) | |
download | SkyblockMod-2b57ccad6d21b325c3164117fe14e00e13399a7c.tar.gz SkyblockMod-2b57ccad6d21b325c3164117fe14e00e13399a7c.tar.bz2 SkyblockMod-2b57ccad6d21b325c3164117fe14e00e13399a7c.zip |
Add CH fishing tracker
Organized change display GUI
Add method to make centered text rendering easier
Diffstat (limited to 'src/main/java/me/Danker/gui/DankerGui.java')
-rw-r--r-- | src/main/java/me/Danker/gui/DankerGui.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index c7af0da..6edffa9 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -7,6 +7,7 @@ import me.Danker.gui.buttons.FeatureButton; import me.Danker.gui.crystalhollowwaypoints.CrystalHollowWaypointsGui; import me.Danker.handlers.ConfigHandler; import me.Danker.handlers.TextRenderer; +import me.Danker.utils.RenderUtils; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; @@ -274,8 +275,7 @@ public class DankerGui extends GuiScreen { super.drawScreen(mouseX, mouseY, partialTicks); String pageText = "Page: " + page + "/" + (int) Math.ceil(foundButtons.size() / 7D); - int pageWidth = mc.fontRendererObj.getStringWidth(pageText); - new TextRenderer(mc, pageText, width / 2 - pageWidth / 2, 10, 1D); + RenderUtils.drawCenteredText(pageText, width, 10, 1D); for (GuiButton button : this.buttonList) { if (button instanceof FeatureButton && button.isMouseOver()) { |