Add mouse move event

This commit is contained in:
Carlos Ballesteros Velasco
2020-05-23 18:46:48 +02:00
parent 0fbf135add
commit 0122908e3e

View File

@@ -14,6 +14,7 @@ suspend fun main() = Korge {
val keysDownText = textLine("Keys:Down")
val keysUpText = textLine("Keys:Up")
val mouseEvText = textLine("Mouse1")
val mouseMoveText = textLine("MouseMove")
val mouseDownText = textLine("MouseDown")
val mouseUpText = textLine("MouseUp")
val mouseClickText = textLine("MouseClick")
@@ -44,6 +45,7 @@ suspend fun main() = Korge {
}
mouse {
onMove { mouseMoveText.text = "Mouse:Move:${nowUnix()}:$it" }
onDown { mouseDownText.text = "Mouse:Down:${nowUnix()}:$it" }
onUp { mouseUpText.text = "Mouse:Up:${nowUnix()}:$it" }
onClick { mouseClickText.text = "Mouse:Click:${nowUnix()}:$it" }