From 8e786d35bfa4bbf990acb2fcde292113b0c68c3b Mon Sep 17 00:00:00 2001 From: syeyoung Date: Sun, 22 Aug 2021 17:11:29 +0900 Subject: - Bug Report 279 --- src/main/java/kr/syeyoung/dungeonsguide/gui/MGui.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') 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(); -- cgit