aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz <lo.scherf@gmail.com>2022-09-11 16:21:35 +0200
committerLorenz <lo.scherf@gmail.com>2022-09-11 16:21:35 +0200
commitb57e445b2fef25d9f6eb7dc016150d1408807b01 (patch)
tree5625511bb4b86c79555010f15748acb33c5ee3c3
parentbebe87adc5357bb0ea9f72384989880586641f0b (diff)
downloadNotEnoughUpdates-b57e445b2fef25d9f6eb7dc016150d1408807b01.tar.gz
NotEnoughUpdates-b57e445b2fef25d9f6eb7dc016150d1408807b01.tar.bz2
NotEnoughUpdates-b57e445b2fef25d9f6eb7dc016150d1408807b01.zip
fixed gui scale for rendering filter hover (thanks again ThexXTURBOXx)
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java
index 3de67f4d..ce0757a6 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlayHover.java
@@ -39,7 +39,6 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.gui.inventory.GuiChest;
-import net.minecraft.client.renderer.GlStateManager;
import org.lwjgl.input.Mouse;
import java.util.ArrayList;
@@ -112,15 +111,8 @@ public class MinionHelperOverlayHover {
if (mouseX > x && mouseX < x + 16 &&
mouseY > y && mouseY < y + 16) {
- GlStateManager.pushMatrix();
- GlStateManager.scale(2f / scaledresolution.getScaleFactor(), 2f / scaledresolution.getScaleFactor(), 1);
- Utils.drawHoveringText(list,
- mouseX * scaledresolution.getScaleFactor() / 2,
- mouseY * scaledresolution.getScaleFactor() / 2,
- scaledWidth * scaledresolution.getScaleFactor() / 2,
- scaledHeight * scaledresolution.getScaleFactor() / 2, -1, Minecraft.getMinecraft().fontRendererObj
- );
- GlStateManager.popMatrix();
+ Utils.drawHoveringText(list, mouseX, mouseY, scaledWidth, scaledHeight, -1,
+ Minecraft.getMinecraft().fontRendererObj);
}
}