aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/gui/HudGui.java
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-05-27 21:53:17 +0700
committerWyvest <45589059+Wyvest@users.noreply.github.com>2022-05-27 21:53:17 +0700
commit606543003a9d205b9c0b6f3c7c2c7dafef5770a4 (patch)
tree9e1aa0ab2c987dc417073072ea1bcb261d502084 /src/main/java/cc/polyfrost/oneconfig/gui/HudGui.java
parent3430c2f03e1996ddb8e029f6f577af8c2a4a80aa (diff)
downloadOneConfig-606543003a9d205b9c0b6f3c7c2c7dafef5770a4.tar.gz
OneConfig-606543003a9d205b9c0b6f3c7c2c7dafef5770a4.tar.bz2
OneConfig-606543003a9d205b9c0b6f3c7c2c7dafef5770a4.zip
fix vigilance buttons + fix ukeyboard
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/gui/HudGui.java')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/HudGui.java21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/HudGui.java b/src/main/java/cc/polyfrost/oneconfig/gui/HudGui.java
index e94ef44..72e8e58 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/HudGui.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/HudGui.java
@@ -305,19 +305,14 @@ public class HudGui extends UScreen {
if (editingHud != null) {
float x = editingHud.getXScaled(this.width);
float y = editingHud.getYScaled(this.height);
- switch (keyCode) {
- case UKeyboard.KEY_UP:
- setPosition(x, y - 1, false);
- break;
- case UKeyboard.KEY_DOWN:
- setPosition(x, y + 1, false);
- break;
- case UKeyboard.KEY_LEFT:
- setPosition(x - 1, y, false);
- break;
- case UKeyboard.KEY_RIGHT:
- setPosition(x + 1, y, false);
- break;
+ if (keyCode == UKeyboard.KEY_UP) {
+ setPosition(x, y - 1, false);
+ } else if (keyCode == UKeyboard.KEY_DOWN) {
+ setPosition(x, y + 1, false);
+ } else if (keyCode == UKeyboard.KEY_LEFT) {
+ setPosition(x - 1, y, false);
+ } else if (keyCode == UKeyboard.KEY_RIGHT) {
+ setPosition(x + 1, y, false);
}
}
super.onKeyPressed(keyCode, typedChar, modifiers);