Bump to OPENRNDR 0.3.45-rc.6
This commit is contained in:
21
openrndr-demos/src/demo/kotlin/DemoMouseCursor01.kt
Normal file
21
openrndr-demos/src/demo/kotlin/DemoMouseCursor01.kt
Normal file
@@ -0,0 +1,21 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user