diff options
| author | hannibal2 <24389977+hannibal002@users.noreply.github.com> | 2023-03-04 03:03:33 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-04 13:03:33 +1100 |
| commit | 5a79ff410eb64e906c555751b32bef87cc7caee9 (patch) | |
| tree | f2c2e40a7cca305959b04d2dfba99ebc3e822949 /src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java | |
| parent | 5dd063fbba6bde64806a7620541dc2d9bdf42871 (diff) | |
| download | notenoughupdates-5a79ff410eb64e906c555751b32bef87cc7caee9.tar.gz notenoughupdates-5a79ff410eb64e906c555751b32bef87cc7caee9.tar.bz2 notenoughupdates-5a79ff410eb64e906c555751b32bef87cc7caee9.zip | |
I hate FontRenderer. (#612)
Co-authored-by: hannibal2 <24389977+hannibal00212@users.noreply.github.com>
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java index 927b5e76..ce7b21b2 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java @@ -1665,7 +1665,7 @@ public class NEUOverlay extends Gui { buttonXSize, ySize, 1 - leftPressed, leftPressed, 1 - leftPressed, leftPressed ); GlStateManager.bindTexture(0); - Utils.drawStringCenteredScaled(EnumChatFormatting.BOLD + "Prev", fr, + Utils.drawStringCenteredScaled(EnumChatFormatting.BOLD + "Prev", leftSide - 1 + buttonXSize * 300 / 480f + leftPressed, top + ySize / 2f + leftPressed, false, (int) (buttonXSize * 240 / 480f), Color.BLACK.getRGB() @@ -1684,7 +1684,7 @@ public class NEUOverlay extends Gui { buttonXSize, ySize, 1 - rightPressed, rightPressed, 1 - rightPressed, rightPressed ); GlStateManager.bindTexture(0); - Utils.drawStringCenteredScaled(EnumChatFormatting.BOLD + "Next", fr, + Utils.drawStringCenteredScaled(EnumChatFormatting.BOLD + "Next", rightSide + 1 - buttonXSize * 300 / 480f + rightPressed, top + ySize / 2f + rightPressed, false, (int) (buttonXSize * 240 / 480f), Color.BLACK.getRGB() @@ -1699,7 +1699,7 @@ public class NEUOverlay extends Gui { new Color(50, 50, 50).getRGB() ); drawRect(leftSide + buttonXSize + 3, top + 1, rightSide - buttonXSize - 3, top + ySize - 1, fg.getRGB()); - Utils.drawStringCenteredScaledMaxWidth(pageText, fr, (leftSide + rightSide) / 2, + Utils.drawStringCenteredScaledMaxWidth(pageText, (leftSide + rightSide) / 2, top + ySize / 2f, false, strMaxLen, Color.BLACK.getRGB() ); } @@ -1845,8 +1845,6 @@ public class NEUOverlay extends Gui { } GlStateManager.enableDepth(); - FontRenderer fr = Minecraft.getMinecraft().fontRendererObj; - Utils.resetGuiScale(); Utils.pushGuiScale(NotEnoughUpdates.INSTANCE.config.itemlist.paneGuiScale); @@ -2238,7 +2236,7 @@ public class NEUOverlay extends Gui { textToDisplay = text; } if (textToDisplay != null) { - Utils.drawHoveringText(textToDisplay, mouseX, mouseY, width, height, -1, fr); + Utils.drawHoveringText(textToDisplay, mouseX, mouseY, width, height, -1); textToDisplay = null; } |
