summaryrefslogtreecommitdiff
path: root/chickadee.scm
diff options
context:
space:
mode:
Diffstat (limited to 'chickadee.scm')
-rw-r--r--chickadee.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/chickadee.scm b/chickadee.scm
index 989056b..8adc313 100644
--- a/chickadee.scm
+++ b/chickadee.scm
@@ -74,6 +74,8 @@
mouse-y
mouse-button-pressed?
mouse-button-released?
+ warp-mouse
+ set-show-cursor!
run-game)
#:re-export (abort-game))
@@ -107,6 +109,9 @@
"Return #t if BUTTON is not currently being pressed."
(sdl2:mouse-button-released? button))
+(define (set-show-cursor! show?)
+ (sdl2:set-show-cursor! show?))
+
(define *controllers* (make-hash-table))
(define (lookup-controller joystick-id)
@@ -241,6 +246,9 @@ border is disabled, otherwise it is enabled.")
"Move the upper-left corner of WINDOW to pixel coordinates (X, Y)."
(sdl2:set-window-position! (unwrap-window window) x y))
+(define (warp-mouse x y)
+ (sdl2:warp-mouse x y (unwrap-window (current-window))))
+
(define* (run-game #:key
(window-title "Chickadee!")
(window-width 640)