keyboard control ported to GDX (at least as much as I can right now)

This commit is contained in:
minjaesong
2017-07-01 18:31:00 +09:00
parent f2a2966d6c
commit cbcd32e132
25 changed files with 298 additions and 327 deletions

View File

@@ -89,22 +89,29 @@ class UIQuickBar : UICanvas, MouseControlled {
handler!!.opacity = 0f
}
override fun mouseMoved(oldx: Int, oldy: Int, newx: Int, newy: Int) {
override fun mouseMoved(screenX: Int, screenY: Int): Boolean {
return false
}
override fun mouseDragged(oldx: Int, oldy: Int, newx: Int, newy: Int) {
override fun touchDragged(screenX: Int, screenY: Int, pointer: Int): Boolean {
return false
}
override fun mousePressed(button: Int, x: Int, y: Int) {
override fun touchDown(screenX: Int, screenY: Int, pointer: Int, button: Int): Boolean {
return false
}
override fun mouseReleased(button: Int, x: Int, y: Int) {
override fun touchUp(screenX: Int, screenY: Int, pointer: Int, button: Int): Boolean {
return false
}
override fun mouseWheelMoved(change: Int) {
selection = selection.plus(if (change > 1) 1 else if (change < -1) -1 else 0).fmod(SLOT_COUNT)
override fun scrolled(amount: Int): Boolean {
selection = selection.plus(if (amount > 1) 1 else if (amount < -1) -1 else 0).fmod(SLOT_COUNT)
return true
}
companion object {
val finalOpacity = 0.8f