somehow fixed a consolewin bug

- It would read a key even if it's closed
This commit is contained in:
minjaesong
2017-10-18 03:52:11 +09:00
parent 06db25fb1a
commit 0004240c52
6 changed files with 98 additions and 8 deletions

View File

@@ -125,6 +125,8 @@ class ConsoleWindow : UICanvas() {
val acceptedChars = "1234567890-=qwfpgjluy;[]\\arstdhneio'zxcvbkm,./!@#$%^&*()_+QWFPGJLUY:{}|ARSTDHNEIO\"ZXCVBKM<>? ".toSet()
override fun keyTyped(character: Char): Boolean {
println("[ConsoleWindow] Key typed event; isVisible = $isVisible")
if (character in acceptedChars) {
commandInputPool!!.append(character)
inputCursorPos += 1