mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 11:34:05 +09:00
keyboard control ported to GDX (at least as much as I can right now)
This commit is contained in:
@@ -10,40 +10,43 @@ import net.torvald.terrarum.virtualcomputer.terminal.Terminal
|
||||
* Created by minjaesong on 16-09-08.
|
||||
*/
|
||||
class UITextTerminal(val terminal: Terminal) : UICanvas, KeyControlled, MouseControlled {
|
||||
override fun mouseMoved(oldx: Int, oldy: Int, newx: Int, newy: Int) {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
|
||||
override fun keyDown(keycode: Int): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun keyPressed(key: Int, c: Char) {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
override fun mouseMoved(screenX: Int, screenY: Int): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun keyReleased(key: Int, c: Char) {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
override fun keyUp(keycode: Int): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun mouseDragged(oldx: Int, oldy: Int, newx: Int, newy: Int) {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
override fun touchDragged(screenX: Int, screenY: Int, pointer: Int): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun controllerButtonPressed(controller: Int, button: Int) {
|
||||
override fun keyTyped(character: Char): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun controllerButtonReleased(controller: Int, button: Int) {
|
||||
override fun touchDown(screenX: Int, screenY: Int, pointer: Int, button: Int): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun touchUp(screenX: Int, screenY: Int, pointer: Int, button: Int): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override fun scrolled(amount: Int): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
override var width: Int = terminal.displayW// + some
|
||||
override var height: Int = terminal.displayH// + frame
|
||||
|
||||
override fun mousePressed(button: Int, x: Int, y: Int) {
|
||||
// monitor on/off, reset switch
|
||||
}
|
||||
|
||||
override fun mouseReleased(button: Int, x: Int, y: Int) {
|
||||
}
|
||||
|
||||
override fun mouseWheelMoved(change: Int) {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Usage: (in StateInGame:) uiHandlerField.ui.handler = uiHandlerField
|
||||
|
||||
Reference in New Issue
Block a user