mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-09 13:21:51 +09:00
key config menu working on ingame
This commit is contained in:
@@ -198,6 +198,26 @@ class UIInventoryEscMenu(val full: UIInventoryFull) : UICanvas() {
|
||||
},
|
||||
)
|
||||
|
||||
private val screenTouchDowns = arrayOf(
|
||||
{ screenX: Int, screenY: Int, pointer: Int, button: Int -> },
|
||||
{ screenX: Int, screenY: Int, pointer: Int, button: Int -> },
|
||||
{ screenX: Int, screenY: Int, pointer: Int, button: Int -> },
|
||||
{ screenX: Int, screenY: Int, pointer: Int, button: Int -> },
|
||||
{ screenX: Int, screenY: Int, pointer: Int, button: Int ->
|
||||
keyConfigUI.touchDown(screenX, screenY, pointer, button)
|
||||
}
|
||||
)
|
||||
|
||||
private val screenTouchUps = arrayOf(
|
||||
{ screenX: Int, screenY: Int, pointer: Int, button: Int -> },
|
||||
{ screenX: Int, screenY: Int, pointer: Int, button: Int -> },
|
||||
{ screenX: Int, screenY: Int, pointer: Int, button: Int -> },
|
||||
{ screenX: Int, screenY: Int, pointer: Int, button: Int -> },
|
||||
{ screenX: Int, screenY: Int, pointer: Int, button: Int ->
|
||||
keyConfigUI.touchUp(screenX, screenY, pointer, button)
|
||||
}
|
||||
)
|
||||
|
||||
override fun show() {
|
||||
INGAME.setTooltipMessage(null)
|
||||
}
|
||||
@@ -234,6 +254,18 @@ class UIInventoryEscMenu(val full: UIInventoryFull) : UICanvas() {
|
||||
screenRenders[screen](batch, camera)
|
||||
}
|
||||
|
||||
override fun touchDown(screenX: Int, screenY: Int, pointer: Int, button: Int): Boolean {
|
||||
super.touchDown(screenX, screenY, pointer, button)
|
||||
screenTouchDowns[screen](screenX, screenY, pointer, button)
|
||||
return true
|
||||
}
|
||||
|
||||
override fun touchUp(screenX: Int, screenY: Int, pointer: Int, button: Int): Boolean {
|
||||
super.touchUp(screenX, screenY, pointer, button)
|
||||
screenTouchUps[screen](screenX, screenY, pointer, button)
|
||||
return true
|
||||
}
|
||||
|
||||
override fun doOpening(delta: Float) {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user