From dc69df9c4e4787aa4d7025ac64b41290a52d79f9 Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Sun, 27 Jun 2021 13:06:01 +0300 Subject: Fix Screen.onClose not being called in CottonInventoryScreen --- .../io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java') 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 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()); -- cgit