aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorJuuxel <6596629+Juuxel@users.noreply.github.com>2021-06-27 13:06:01 +0300
committerJuuxel <6596629+Juuxel@users.noreply.github.com>2021-06-27 13:06:01 +0300
commitdc69df9c4e4787aa4d7025ac64b41290a52d79f9 (patch)
tree955f74edb0d2cd8e71fc560f9243ea6d534562bd /src/main
parent18314110acf492a5355dd97a9c481a6d05f37fc6 (diff)
downloadLibGui-dc69df9c4e4787aa4d7025ac64b41290a52d79f9.tar.gz
LibGui-dc69df9c4e4787aa4d7025ac64b41290a52d79f9.tar.bz2
LibGui-dc69df9c4e4787aa4d7025ac64b41290a52d79f9.zip
Fix Screen.onClose not being called in CottonInventoryScreen
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java2
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());