diff options
author | Falkreon <falkreon@gmail.com> | 2019-08-21 09:01:36 -0500 |
---|---|---|
committer | Falkreon <falkreon@gmail.com> | 2019-08-21 09:01:36 -0500 |
commit | f61e0843083b1ca73ad22b5a33e941f3ab21442c (patch) | |
tree | 30b57873da724aff83b8b9c9ed791d6bc246b158 | |
parent | cec1b2c39315aef3c5e1c123c08595908839bdca (diff) | |
download | LibGui-f61e0843083b1ca73ad22b5a33e941f3ab21442c.tar.gz LibGui-f61e0843083b1ca73ad22b5a33e941f3ab21442c.tar.bz2 LibGui-f61e0843083b1ca73ad22b5a33e941f3ab21442c.zip |
Fix ESC not closing gui, Remove debug println
3 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/CottonScreenController.java b/src/main/java/io/github/cottonmc/cotton/gui/CottonScreenController.java index a063424..4710d5b 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/CottonScreenController.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/CottonScreenController.java @@ -292,7 +292,6 @@ public class CottonScreenController extends CraftingContainer<Inventory> impleme } public void doClick(int x, int y, int button) { - System.out.println("Doing click"); if (focus!=null) { int wx = focus.getAbsoluteX(); int wy = focus.getAbsoluteY(); diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/ClientCottonScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/ClientCottonScreen.java index d6b32c2..f19cce7 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/ClientCottonScreen.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/ClientCottonScreen.java @@ -154,6 +154,7 @@ public class ClientCottonScreen extends Screen { @Override public boolean keyPressed(int ch, int keyCode, int modifiers) { + if (super.keyPressed(ch, keyCode, modifiers)) return true; if (description.getFocus()==null) return false; description.getFocus().onKeyPressed(ch, keyCode, modifiers); return true; diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonScreen.java index 9f7e374..390b715 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonScreen.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonScreen.java @@ -81,6 +81,7 @@ public class CottonScreen<T extends CottonScreenController> extends AbstractCont @Override public boolean keyPressed(int ch, int keyCode, int modifiers) { + if (super.keyPressed(ch, keyCode, modifiers)) return true; if (container.getFocus()==null) return false; container.getFocus().onKeyPressed(ch, keyCode, modifiers); return true; |