diff options
| author | Moulberry <james.jenour@student.scotch.wa.edu.au> | 2020-10-03 06:09:28 +1000 |
|---|---|---|
| committer | Moulberry <james.jenour@student.scotch.wa.edu.au> | 2020-10-03 06:09:28 +1000 |
| commit | 275fe45caa8eb1048914d864aafae21f3f3a1157 (patch) | |
| tree | 87fe9a8e5f996c7cbc6fc81f2f522561ceb96992 /src/main/java/io/github/moulberry/notenoughupdates/util/TexLoc.java | |
| parent | bb067068aabda36f8ba74b34a68856e19139beb9 (diff) | |
| download | notenoughupdates-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.java | 8 |
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; } } |
