key config menu working on ingame

This commit is contained in:
minjaesong
2022-01-28 10:49:02 +09:00
parent 956c9d44e1
commit ff400d1e2f

View File

@@ -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() { override fun show() {
INGAME.setTooltipMessage(null) INGAME.setTooltipMessage(null)
} }
@@ -234,6 +254,18 @@ class UIInventoryEscMenu(val full: UIInventoryFull) : UICanvas() {
screenRenders[screen](batch, camera) 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) { override fun doOpening(delta: Float) {
} }