From 4bb44d9d85ad0edbc7df875029560e9c5e7ca459 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Thu, 5 Aug 2021 13:57:38 +0900 Subject: - Partyfinder now accordingly scales to user's scaledresolution --- .../java/kr/syeyoung/dungeonsguide/gui/elements/MPanelScaledGUI.java | 2 +- src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTooltipText.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/gui/elements') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPanelScaledGUI.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPanelScaledGUI.java index a9ce318b..ed84b880 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPanelScaledGUI.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MPanelScaledGUI.java @@ -31,7 +31,7 @@ import java.awt.*; public class MPanelScaledGUI extends MPanel { @Getter protected double scale = 1.0; - + @Getter protected double relativeScale; public void setScale(double scale) { diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTooltipText.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTooltipText.java index fe93d82a..e3d0a3c4 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTooltipText.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTooltipText.java @@ -39,6 +39,6 @@ public class MTooltipText extends MTooltip { @Override public void render(int absMousex, int absMousey, int relMousex0, int relMousey0, float partialTicks, Rectangle scissor) { - GuiUtils.drawHoveringText(tooltipText, relMousex0, relMousey0, Minecraft.getMinecraft().displayWidth, Minecraft.getMinecraft().displayHeight, -1, Minecraft.getMinecraft().fontRendererObj); + GuiUtils.drawHoveringText(tooltipText, relMousex0, relMousey0, (int) (Minecraft.getMinecraft().displayWidth/getRelativeScale()), (int) (Minecraft.getMinecraft().displayHeight/getRelativeScale()), -1, Minecraft.getMinecraft().fontRendererObj); } } -- cgit