Files
orx/openrndr-demos/src/demo/kotlin/DemoMouseCursor01.kt
2020-12-25 09:13:50 +01:00

21 lines
563 B
Kotlin

import org.openrndr.CursorType
import org.openrndr.application
fun main() {
application {
program {
keyboard.character.listen {
if (it.character == 'c') {
mouse.cursorVisible = !mouse.cursorVisible
}
}
extend {
if (mouse.position.x < width/2.0) {
mouse.cursorType = CursorType.ARROW_CURSOR
} else {
mouse.cursorType = CursorType.HAND_CURSOR
}
}
}
}
}