summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@vistahigherlearning.com>2020-10-06 18:58:12 -0400
committerDavid Thompson <dthompson@vistahigherlearning.com>2020-10-06 18:58:12 -0400
commita1a001a83764a838d43cf5a38ed4e3f26df3a5d5 (patch)
tree635b1b55b1bd6823a7837e392ea736a98a0d5da9
parentc808d99f048daf4284e1ab431166347dc5456706 (diff)
scene: Remove scancode arg from key press/release methods.
-rw-r--r--examples/shmup/shmup.scm4
-rw-r--r--examples/tetra/tetra.scm2
-rw-r--r--starling/kernel.scm2
-rw-r--r--starling/minibuffer.scm2
-rw-r--r--starling/scene.scm12
5 files changed, 11 insertions, 11 deletions
diff --git a/examples/shmup/shmup.scm b/examples/shmup/shmup.scm
index 135027b..b15ef7c 100644
--- a/examples/shmup/shmup.scm
+++ b/examples/shmup/shmup.scm
@@ -814,7 +814,7 @@
(resume (& shmup player))
(for-each resume (enemies shmup)))
-(define-method (on-key-press (shmup <shmup>) key scancode modifiers repeat?)
+(define-method (on-key-press (shmup <shmup>) key modifiers repeat?)
(match (state shmup)
('play
(match key
@@ -835,7 +835,7 @@
(_ #f)))
(_ #f)))
-(define-method (on-key-release (shmup <shmup>) key scancode modifiers)
+(define-method (on-key-release (shmup <shmup>) key modifiers)
(match (state shmup)
('play
(match key
diff --git a/examples/tetra/tetra.scm b/examples/tetra/tetra.scm
index b02aeea..5723b31 100644
--- a/examples/tetra/tetra.scm
+++ b/examples/tetra/tetra.scm
@@ -662,7 +662,7 @@ area next to the board."
(when game-over-container
(detach game-over-container))))
-(define-method (on-key-press (tetra <tetra>) key scancode modifiers repeat?)
+(define-method (on-key-press (tetra <tetra>) key modifiers repeat?)
(match (state tetra)
('play
(match key
diff --git a/starling/kernel.scm b/starling/kernel.scm
index 0608241..099c462 100644
--- a/starling/kernel.scm
+++ b/starling/kernel.scm
@@ -173,7 +173,7 @@
(sleep 60)
(update-fps (& kernel fps) (fps kernel))))))
-(define-method (on-key-press (kernel <kernel>) key scancode modifiers repeat?)
+(define-method (on-key-press (kernel <kernel>) key modifiers repeat?)
;; Hot keys when in dev mode
(when developer-mode?
(unless (& kernel minibuffer)
diff --git a/starling/minibuffer.scm b/starling/minibuffer.scm
index 54aa50d..6b2b6bc 100644
--- a/starling/minibuffer.scm
+++ b/starling/minibuffer.scm
@@ -121,7 +121,7 @@
(render-tree (overlay-scene minibuffer) alpha)
(next-method))
-(define-method (on-key-press (minibuffer <minibuffer>) key scancode modifiers repeat?)
+(define-method (on-key-press (minibuffer <minibuffer>) key modifiers repeat?)
(match key
('escape (close-minibuffer minibuffer))
('return (run-command minibuffer))
diff --git a/starling/scene.scm b/starling/scene.scm
index afe3827..7412727 100644
--- a/starling/scene.scm
+++ b/starling/scene.scm
@@ -78,10 +78,10 @@
(define-method (on-quit (scene <scene>))
(abort-game))
-(define-method (on-key-press (scene <scene>) key scancode modifiers repeat?)
+(define-method (on-key-press (scene <scene>) key modifiers repeat?)
#t)
-(define-method (on-key-release (scene <scene>) key scancode modifiers)
+(define-method (on-key-release (scene <scene>) key modifiers)
#t)
(define-method (on-text-input (scene <scene>) text)
@@ -164,11 +164,11 @@
(define-method (on-quit (mux <scene-mux>))
(on-quit (current-scene mux)))
-(define-method (on-key-press (mux <scene-mux>) key scancode modifiers repeat?)
- (on-key-press (current-scene mux) key scancode modifiers repeat?))
+(define-method (on-key-press (mux <scene-mux>) key modifiers repeat?)
+ (on-key-press (current-scene mux) key modifiers repeat?))
-(define-method (on-key-release (mux <scene-mux>) key scancode modifiers)
- (on-key-release (current-scene mux) key scancode modifiers))
+(define-method (on-key-release (mux <scene-mux>) key modifiers)
+ (on-key-release (current-scene mux) key modifiers))
(define-method (on-text-input (mux <scene-mux>) text)
(on-text-input (current-scene mux) text))