aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/gui')
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/gui/MPanel.java2
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java1
-rw-r--r--src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTooltip.java5
3 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/MPanel.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/MPanel.java
index 5f7ff538..aa949d16 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/MPanel.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/MPanel.java
@@ -21,6 +21,7 @@ package kr.syeyoung.dungeonsguide.gui;
import kr.syeyoung.dungeonsguide.gui.elements.MTooltip;
import lombok.AccessLevel;
import lombok.Getter;
+import lombok.Setter;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.ScaledResolution;
@@ -45,6 +46,7 @@ public class MPanel {
protected boolean isFocused;
@Getter
+ @Setter
protected MPanel parent;
public void setBackgroundColor(Color c) {
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java
index d870daf2..4ad6bd45 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java
@@ -132,6 +132,7 @@ public class MNavigatingPane extends MPanel {
panel2.setBackgroundColor(background2);
pages.put(currentPage, panel2);
panel2.setBounds(new Rectangle(1,30,getBounds().width-2, getBounds().height-31));
+ panel2.setParent(this);
}
dynamic.add(pages.get(currentPage));
dynamic.add(back);
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTooltip.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTooltip.java
index 56eb2821..561ecb0c 100644
--- a/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTooltip.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTooltip.java
@@ -40,6 +40,11 @@ public class MTooltip extends MPanel {
root.removeTooltip(this);
}
+
+ public boolean isOpen() {
+ return root != null;
+ }
+
@Override
public int getTooltipsOpen() {
return super.getTooltipsOpen() - 1;