aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-05-15 20:09:39 +0900
committersyeyoung <cyong06@naver.com>2021-05-15 20:09:39 +0900
commitbea2927eb21f73c5872e9a5023ae7d9dbf86392c (patch)
treef8e1c625059106fe58bb1e0a26da2aee52a3d2ef /src/main/java/kr/syeyoung
parente0a46c19ab3e1cab3f3b2f2696094930348f2575 (diff)
downloadSkyblock-Dungeons-Guide-bea2927eb21f73c5872e9a5023ae7d9dbf86392c.tar.gz
Skyblock-Dungeons-Guide-bea2927eb21f73c5872e9a5023ae7d9dbf86392c.tar.bz2
Skyblock-Dungeons-Guide-bea2927eb21f73c5872e9a5023ae7d9dbf86392c.zip
Popup left if overflow.
Diffstat (limited to 'src/main/java/kr/syeyoung')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/features/impl/secret/FeatureMechanicBrowse.java8
1 files changed, 4 insertions, 4 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 8415d2b7..4f466cc3 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
@@ -220,9 +220,9 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
if (selected != -1) {
- boolean overFlows = new ScaledResolution(Minecraft.getMinecraft()).getScaledWidth() < feature.x + feature.width;
+ boolean overFlows = new ScaledResolution(Minecraft.getMinecraft()).getScaledWidth() < feature.x + 2*feature.width;
- clip(new ScaledResolution(Minecraft.getMinecraft()), overFlows ? feature.x - feature.width : feature.width, feature.y + fr.FONT_HEIGHT + 5, feature.width , feature.height - fr.FONT_HEIGHT - 6);
+ clip(new ScaledResolution(Minecraft.getMinecraft()), overFlows ? feature.x - feature.width : feature.x + feature.width, feature.y + fr.FONT_HEIGHT + 5, feature.width , feature.height - fr.FONT_HEIGHT - 6);
GlStateManager.translate(overFlows ? - feature.width : feature.width, selected * fr.FONT_HEIGHT, 0);
Gui.drawRect(0, 0, feature.width, fr.FONT_HEIGHT * possibleStates.size() + 4, 0xFF444444);
Gui.drawRect(-1, 1, feature.width - 1, fr.FONT_HEIGHT * possibleStates.size() + 3, 0xFF262626);
@@ -230,7 +230,7 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
Point popupStart = new Point(overFlows ? feature.x - feature.width : feature.x + feature.width, (selected + 1) * fr.FONT_HEIGHT +6 + feature.y - dy + 2);
for (int i = 0; i < possibleStates.size(); i++) {
- if (new Rectangle(overFlows ? feature.x - feature.width : feature.width, popupStart.y + i * fr.FONT_HEIGHT, feature.width, fr.FONT_HEIGHT).contains(mouseX, mouseY)) {
+ if (new Rectangle(overFlows ? feature.x - feature.width : feature.x + feature.width, popupStart.y + i * fr.FONT_HEIGHT, feature.width, fr.FONT_HEIGHT).contains(mouseX, mouseY)) {
Gui.drawRect(-2, i * fr.FONT_HEIGHT, feature.width - 3, i * fr.FONT_HEIGHT + fr.FONT_HEIGHT - 1, 0xFF555555);
}
GlStateManager.enableBlend();
@@ -387,7 +387,7 @@ public class FeatureMechanicBrowse extends GuiFeature implements GuiPreRenderLis
Rectangle feature = getFeatureRect().getRectangle();
FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
- boolean overFlows = new ScaledResolution(Minecraft.getMinecraft()).getScaledWidth() < feature.x + feature.width;
+ boolean overFlows = new ScaledResolution(Minecraft.getMinecraft()).getScaledWidth() < feature.x + 2*feature.width;
Point popupStart = new Point(overFlows ? feature.x - feature.width : feature.x + feature.width, (selected + 1) * fr.FONT_HEIGHT +6 + feature.y - dy);
if (feature.contains(mouseX, mouseY)) {