diff options
author | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2021-06-27 13:06:01 +0300 |
---|---|---|
committer | Juuxel <6596629+Juuxel@users.noreply.github.com> | 2021-06-27 13:06:01 +0300 |
commit | dc69df9c4e4787aa4d7025ac64b41290a52d79f9 (patch) | |
tree | 955f74edb0d2cd8e71fc560f9243ea6d534562bd | |
parent | 18314110acf492a5355dd97a9c481a6d05f37fc6 (diff) | |
download | LibGui-dc69df9c4e4787aa4d7025ac64b41290a52d79f9.tar.gz LibGui-dc69df9c4e4787aa4d7025ac64b41290a52d79f9.tar.bz2 LibGui-dc69df9c4e4787aa4d7025ac64b41290a52d79f9.zip |
Fix Screen.onClose not being called in CottonInventoryScreen
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java index dba1add..6341894 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java @@ -152,7 +152,7 @@ public class CottonInventoryScreen<T extends SyncedGuiDescription> extends Handl public boolean keyPressed(int ch, int keyCode, int modifiers) { //System.out.println("Key " + Integer.toHexString(ch)+" "+Integer.toHexString(keyCode)); if (ch==GLFW.GLFW_KEY_ESCAPE) { - this.client.player.closeHandledScreen(); + onClose(); return true; } else if (ch==GLFW.GLFW_KEY_TAB) { changeFocus(!hasShiftDown()); |