diff options
author | syeyoung <cyong06@naver.com> | 2021-08-22 17:11:29 +0900 |
---|---|---|
committer | syeyoung <cyong06@naver.com> | 2021-08-22 17:11:29 +0900 |
commit | 8e786d35bfa4bbf990acb2fcde292113b0c68c3b (patch) | |
tree | 5f543cfff2171f7a94a19655758bff0f28403284 /src/main/java/kr/syeyoung/dungeonsguide/gui/MGui.java | |
parent | 4d68024dc365c49129ea1e41e0f037921e01981c (diff) | |
download | Skyblock-Dungeons-Guide-8e786d35bfa4bbf990acb2fcde292113b0c68c3b.tar.gz Skyblock-Dungeons-Guide-8e786d35bfa4bbf990acb2fcde292113b0c68c3b.tar.bz2 Skyblock-Dungeons-Guide-8e786d35bfa4bbf990acb2fcde292113b0c68c3b.zip |
- Bug Report 279
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/gui/MGui.java')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/gui/MGui.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gui/MGui.java b/src/main/java/kr/syeyoung/dungeonsguide/gui/MGui.java index f230369c..5ee5c42a 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/gui/MGui.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/gui/MGui.java @@ -38,6 +38,7 @@ public class MGui extends GuiScreen { @Getter private final MRootPanel mainPanel = new MRootPanel(); + private boolean isOpen = false; public MGui(){ try { @@ -50,6 +51,7 @@ public class MGui extends GuiScreen { @Override public void initGui() { super.initGui(); + isOpen = true; ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft()); mainPanel.setBounds(new Rectangle(0,0,Minecraft.getMinecraft().displayWidth,Minecraft.getMinecraft().displayHeight)); } @@ -104,6 +106,7 @@ public class MGui extends GuiScreen { @Override public void onGuiClosed() { super.onGuiClosed(); + isOpen = false; try { Mouse.setNativeCursor(null); @@ -154,6 +157,7 @@ public class MGui extends GuiScreen { private int lastX, lastY; @Override public void handleMouseInput() throws IOException { + if (!isOpen) return; try { int i = Mouse.getEventX(); int j = this.mc.displayHeight - Mouse.getEventY(); |