aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/util/TexLoc.java
diff options
context:
space:
mode:
authorMoulberry <james.jenour@student.scotch.wa.edu.au>2020-10-03 06:09:28 +1000
committerMoulberry <james.jenour@student.scotch.wa.edu.au>2020-10-03 06:09:28 +1000
commit275fe45caa8eb1048914d864aafae21f3f3a1157 (patch)
tree87fe9a8e5f996c7cbc6fc81f2f522561ceb96992 /src/main/java/io/github/moulberry/notenoughupdates/util/TexLoc.java
parentbb067068aabda36f8ba74b34a68856e19139beb9 (diff)
downloadnotenoughupdates-275fe45caa8eb1048914d864aafae21f3f3a1157.tar.gz
notenoughupdates-275fe45caa8eb1048914d864aafae21f3f3a1157.tar.bz2
notenoughupdates-275fe45caa8eb1048914d864aafae21f3f3a1157.zip
1.3.3-ALPA
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/TexLoc.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/util/TexLoc.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/TexLoc.java b/src/main/java/io/github/moulberry/notenoughupdates/util/TexLoc.java
index 48eea22d..5e792cf5 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/util/TexLoc.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/util/TexLoc.java
@@ -20,7 +20,7 @@ public class TexLoc {
this.toggleKey = toggleKey;
}
- public void handleKeyboardInput() {
+ public boolean handleKeyboardInput() {
int mult=1;
if(Keyboard.isKeyDown(Keyboard.KEY_LCONTROL)) mult=10;
if(Keyboard.isKeyDown(toggleKey)) {
@@ -31,7 +31,7 @@ public class TexLoc {
} else {
pressedLastTick = false;
}
- if(toggled) {
+ if(toggled || toggleKey == 0) {
if(Keyboard.isKeyDown(Keyboard.KEY_LEFT)) {
if(!dirPressed) x-=mult;
dirPressed = true;
@@ -46,10 +46,12 @@ public class TexLoc {
dirPressed = true;
} else {
dirPressed = false;
- return;
+ return false;
}
System.out.println("X: " + x + " ; Y: " + y);
+ return true;
}
+ return false;
}
}