aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr/syeyoung')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/mechanicbrowser/PanelMechanicBrowser.java5
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));
}
}