aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-07-20 13:35:06 +0900
committersyeyoung <cyong06@naver.com>2021-07-20 14:42:12 +0900
commiteb27fcef7ac26c71941c7911ebf6aa20254a2855 (patch)
tree65a84edb26375f34bf1f43b6ec4315700032da23 /src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret
parent0af44a60844be83fb371c2f0eaeb2feccd1f0207 (diff)
downloadSkyblock-Dungeons-Guide-eb27fcef7ac26c71941c7911ebf6aa20254a2855.tar.gz
Skyblock-Dungeons-Guide-eb27fcef7ac26c71941c7911ebf6aa20254a2855.tar.bz2
Skyblock-Dungeons-Guide-eb27fcef7ac26c71941c7911ebf6aa20254a2855.zip
Better snapping and use the new tooltips
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java
index 4f466cc3..f2cac046 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java
@@ -152,11 +152,10 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
DungeonRoom dungeonRoom = context.getRoomMapper().get(roomPt);
if (dungeonRoom == null) return;
if (!(dungeonRoom.getRoomProcessor() instanceof GeneralRoomProcessor)) return;
- ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft());
- int width = scaledResolution.getScaledWidth();
- int height = scaledResolution.getScaledHeight();
- int mouseX = Mouse.getX() * width / Minecraft.getMinecraft().displayWidth;
- int mouseY = height - Mouse.getY() * height / Minecraft.getMinecraft().displayHeight - 1;
+ int width = Minecraft.getMinecraft().displayWidth;
+ int height = Minecraft.getMinecraft().displayHeight;
+ int mouseX = Mouse.getX() ;
+ int mouseY = height - Mouse.getY() - 1;
GlStateManager.pushMatrix();
GlStateManager.enableTexture2D();
GlStateManager.disableLighting();
@@ -379,11 +378,10 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
if (dungeonRoom == null) return;
if (!(dungeonRoom.getRoomProcessor() instanceof GeneralRoomProcessor)) return;
- ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft());
- int width = scaledResolution.getScaledWidth();
- int height = scaledResolution.getScaledHeight();
- int mouseX = Mouse.getX() * width / Minecraft.getMinecraft().displayWidth;
- int mouseY = height - Mouse.getY() * height / Minecraft.getMinecraft().displayHeight - 1;
+ int width = Minecraft.getMinecraft().displayWidth;
+ int height = Minecraft.getMinecraft().displayHeight;
+ int mouseX = Mouse.getX();
+ int mouseY = height - Mouse.getY() - 1;
Rectangle feature = getFeatureRect().getRectangle();
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;