mirror of
https://github.com/jlengrand/korge-samples.git
synced 2026-03-10 08:31:18 +00:00
Add mouse move event
This commit is contained in:
@@ -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" }
|
||||
|
||||
Reference in New Issue
Block a user