From c72f2d573ba425871642f2c5b98e7630c10c30fd Mon Sep 17 00:00:00 2001 From: xander Date: Sat, 10 Sep 2022 13:44:34 +0100 Subject: input field improvements you can now escape out with `ESC` fix selection highlight not matching up with the color controller consume actions --- .../yacl/gui/controllers/string/StringControllerElement.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/dev/isxander/yacl/gui/controllers/string/StringControllerElement.java b/src/main/java/dev/isxander/yacl/gui/controllers/string/StringControllerElement.java index 9b549bc..c606d69 100644 --- a/src/main/java/dev/isxander/yacl/gui/controllers/string/StringControllerElement.java +++ b/src/main/java/dev/isxander/yacl/gui/controllers/string/StringControllerElement.java @@ -48,7 +48,7 @@ public class StringControllerElement extends ControllerWidget { + inputFieldFocused = false; + return true; + } case GLFW.GLFW_KEY_LEFT -> { if (Screen.hasShiftDown()) { if (Screen.hasControlDown()) { @@ -132,14 +136,18 @@ public class StringControllerElement extends ControllerWidget 0) { inputField.deleteCharAt(caretPos - 1); caretPos--; + updateControl(); } } @@ -228,7 +237,6 @@ public class StringControllerElement extends ControllerWidget