diff options
author | Juuz <6596629+Juuxel@users.noreply.github.com> | 2023-10-15 15:08:23 +0300 |
---|---|---|
committer | Juuz <6596629+Juuxel@users.noreply.github.com> | 2023-10-15 15:08:23 +0300 |
commit | edfe42b5ac64f19979d42ba4ccc8f77ef36039a4 (patch) | |
tree | ce5a70877dfa0934498fe65b3eeac7467085780b | |
parent | ec57b2bdcb58868c40f30f0b21d8e693b5f9fd64 (diff) | |
download | LibGui-edfe42b5ac64f19979d42ba4ccc8f77ef36039a4.tar.gz LibGui-edfe42b5ac64f19979d42ba4ccc8f77ef36039a4.tar.bz2 LibGui-edfe42b5ac64f19979d42ba4ccc8f77ef36039a4.zip |
WTextField: Fix onCharTyped not considering editability
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java index 0492e2d..ceb7f34 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WTextField.java @@ -374,6 +374,7 @@ public class WTextField extends WWidget { @Environment(EnvType.CLIENT) @Override public InputResult onCharTyped(char ch) { + if (!isEditable()) return InputResult.IGNORED; insertText(ch + ""); return InputResult.PROCESSED; } |