diff options
author | syeyoung <cyong06@naver.com> | 2021-08-06 13:02:24 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-08-06 13:02:24 +0900 |
commit | 41cdb65072e4d673363694e48647f91aaf7a3710 (patch) | |
tree | a5eb9a85df8f5436c56d829f00c47d74f75a4784 /src/main/java/kr | |
parent | 6c29722a22f715a1d0371f11be24ed23da77c1a1 (diff) | |
download | Skyblock-Dungeons-Guide-41cdb65072e4d673363694e48647f91aaf7a3710.tar.gz Skyblock-Dungeons-Guide-41cdb65072e4d673363694e48647f91aaf7a3710.tar.bz2 Skyblock-Dungeons-Guide-41cdb65072e4d673363694e48647f91aaf7a3710.zip |
Tooltips can now go left
Diffstat (limited to 'src/main/java/kr')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/mechanicbrowser/PanelMechanicBrowser.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/mechanicbrowser/PanelMechanicBrowser.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/mechanicbrowser/PanelMechanicBrowser.java index 866d5773..e1c5359f 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/mechanicbrowser/PanelMechanicBrowser.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/mechanicbrowser/PanelMechanicBrowser.java @@ -264,7 +264,8 @@ public class PanelMechanicBrowser extends MPanelScaledGUI { } mechanicBrowserTooltip.setScale(getScale()); Dimension prefSize = mechanicBrowserTooltip.getPreferredSize(); - mechanicBrowserTooltip.setBounds(new Rectangle(bounds.x + bounds.width, latestTooltipDY + bounds.y, prefSize.width, prefSize.height)); + mechanicBrowserTooltip.setBounds(new Rectangle(bounds.x + + (bounds.x > Minecraft.getMinecraft().displayWidth/2 ? -prefSize.width : bounds.width), latestTooltipDY + bounds.y, prefSize.width, prefSize.height)); mechanicBrowserTooltip.open(this); } @@ -299,7 +300,7 @@ public class PanelMechanicBrowser extends MPanelScaledGUI { if (mechanicBrowserTooltip != null) { Dimension prefSize = mechanicBrowserTooltip.getPreferredSize(); mechanicBrowserTooltip.setScale(getScale()); - mechanicBrowserTooltip.setBounds(new Rectangle(bounds.x + bounds.width, latestTooltipDY + bounds.y, prefSize.width, prefSize.height)); + mechanicBrowserTooltip.setBounds(new Rectangle(bounds.x + (bounds.x > Minecraft.getMinecraft().displayWidth/2 ? -prefSize.width: bounds.width), latestTooltipDY + bounds.y, prefSize.width, prefSize.height)); } } |