From eb27fcef7ac26c71941c7911ebf6aa20254a2855 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Tue, 20 Jul 2021 13:35:06 +0900 Subject: Better snapping and use the new tooltips --- .../java/kr/syeyoung/dungeonsguide/gui/elements/MNavigatingPane.java | 1 + src/main/java/kr/syeyoung/dungeonsguide/gui/elements/MTooltip.java | 5 +++++ 2 files changed, 6 insertions(+) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/gui/elements') 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; -- cgit