aboutsummaryrefslogtreecommitdiff
path: root/src/client/java/dev/isxander/yacl/gui/controllers/cycling
diff options
context:
space:
mode:
authorisXander <isxander@users.noreply.github.com>2022-12-03 18:57:03 +0000
committerisXander <isxander@users.noreply.github.com>2022-12-03 18:57:03 +0000
commitdaf3168671bc9c0cd64693d7129cddfdb1a08bb2 (patch)
treea128054f311448d806da0838ec2a4cd4bdbc7241 /src/client/java/dev/isxander/yacl/gui/controllers/cycling
parentb953bd7cc37dcd32da9da85baa5f1b83646d5abb (diff)
downloadYetAnotherConfigLib-daf3168671bc9c0cd64693d7129cddfdb1a08bb2.tar.gz
YetAnotherConfigLib-daf3168671bc9c0cd64693d7129cddfdb1a08bb2.tar.bz2
YetAnotherConfigLib-daf3168671bc9c0cd64693d7129cddfdb1a08bb2.zip
number fields + StringControllerElement improvements
when highlighted text, arrow keys go to each side of the selection switch to InputUtil instead of GLFW bump yarn
Diffstat (limited to 'src/client/java/dev/isxander/yacl/gui/controllers/cycling')
-rw-r--r--src/client/java/dev/isxander/yacl/gui/controllers/cycling/CyclingControllerElement.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/java/dev/isxander/yacl/gui/controllers/cycling/CyclingControllerElement.java b/src/client/java/dev/isxander/yacl/gui/controllers/cycling/CyclingControllerElement.java
index ab0a9c3..246fbec 100644
--- a/src/client/java/dev/isxander/yacl/gui/controllers/cycling/CyclingControllerElement.java
+++ b/src/client/java/dev/isxander/yacl/gui/controllers/cycling/CyclingControllerElement.java
@@ -4,7 +4,7 @@ import dev.isxander.yacl.api.utils.Dimension;
import dev.isxander.yacl.gui.YACLScreen;
import dev.isxander.yacl.gui.controllers.ControllerWidget;
import net.minecraft.client.gui.screen.Screen;
-import org.lwjgl.glfw.GLFW;
+import net.minecraft.client.util.InputUtil;
public class CyclingControllerElement extends ControllerWidget<ICyclingController<?>> {
@@ -39,11 +39,11 @@ public class CyclingControllerElement extends ControllerWidget<ICyclingControlle
return false;
switch (keyCode) {
- case GLFW.GLFW_KEY_LEFT, GLFW.GLFW_KEY_DOWN ->
+ case InputUtil.GLFW_KEY_LEFT, InputUtil.GLFW_KEY_DOWN ->
cycleValue(-1);
- case GLFW.GLFW_KEY_RIGHT, GLFW.GLFW_KEY_UP ->
+ case InputUtil.GLFW_KEY_RIGHT, InputUtil.GLFW_KEY_UP ->
cycleValue(1);
- case GLFW.GLFW_KEY_ENTER, GLFW.GLFW_KEY_SPACE, GLFW.GLFW_KEY_KP_ENTER ->
+ case InputUtil.GLFW_KEY_ENTER, InputUtil.GLFW_KEY_SPACE, InputUtil.GLFW_KEY_KP_ENTER ->
cycleValue(Screen.hasControlDown() || Screen.hasShiftDown() ? -1 : 1);
default -> {
return false;