From a68113f1971ccf41da055a40040e76f27ad38520 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 8 Apr 2020 08:58:50 -0400 Subject: Add controller-button-released? procedure. --- chickadee.scm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'chickadee.scm') diff --git a/chickadee.scm b/chickadee.scm index 876c59e..4edeb03 100644 --- a/chickadee.scm +++ b/chickadee.scm @@ -63,6 +63,7 @@ set-window-position! set-window-fullscreen! controller-button-pressed? + controller-button-released? controller-axis controller-name key-pressed? @@ -118,6 +119,10 @@ "Return #t if BUTTON is currently being pressed on CONTROLLER." (sdl2:game-controller-button-pressed? controller button)) +(define (controller-button-released? controller button) + "Return #t if BUTTON is not currently being pressed on CONTROLLER." + (not (controller-button-pressed? controller button))) + (define (controller-axis controller axis) "Return a floating point value in the range [-1, 1] corresponding to how much AXIS is being pushed on CONTROLLER. 0 is returned if AXIS is -- cgit v1.2.3