diff options
author | Juuz <6596629+Juuxel@users.noreply.github.com> | 2021-09-12 15:23:48 +0300 |
---|---|---|
committer | Juuz <6596629+Juuxel@users.noreply.github.com> | 2021-09-12 15:23:48 +0300 |
commit | 8eb2a20924b4aacd9d3f470d52191ff9165c6042 (patch) | |
tree | 0e55024a2409f3f0814779eec6a28130e50fc910 | |
parent | c6cf5ebf90de7abea4c44a8ed0126d24e6f05ba5 (diff) | |
download | LibGui-4.2.1.tar.gz LibGui-4.2.1.tar.bz2 LibGui-4.2.1.zip |
Fix #137, bump version to 4.2.14.2.1
-rw-r--r-- | gradle.properties | 2 | ||||
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/client/CottonInventoryScreen.java | 17 |
2 files changed, 5 insertions, 14 deletions
diff --git a/gradle.properties b/gradle.properties index 9a05455..4d860e1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G loader_version=0.11.6 # Mod Properties - mod_version = 4.2.0 + mod_version = 4.2.1 maven_group = io.github.cottonmc archives_base_name = LibGui 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 953563c..82d8d4b 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 @@ -163,21 +163,12 @@ public class CottonInventoryScreen<T extends SyncedGuiDescription> extends Handl @Override 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) { - onClose(); - return true; - } else if (ch==GLFW.GLFW_KEY_TAB) { - changeFocus(!hasShiftDown()); - return true; + if (ch == GLFW.GLFW_KEY_ESCAPE || ch == GLFW.GLFW_KEY_TAB) { + // special hardcoded keys, these will never be delivered to widgets + return super.keyPressed(ch, keyCode, modifiers); } else { - //if (super.keyPressed(ch, keyCode, modifiers)) return true; if (description.getFocus()==null) { - if (client.options.keyInventory.matchesKey(ch, keyCode)) { - this.client.player.closeHandledScreen(); - return true; - } - return false; + return super.keyPressed(ch, keyCode, modifiers); } else { description.getFocus().onKeyPressed(ch, keyCode, modifiers); return true; |