summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2018-08-30 08:14:15 -0400
committerDavid Thompson <dthompson2@worcester.edu>2018-08-30 08:14:15 -0400
commitdb5cd16428f88ceb7d2906486de6c18753f95ec6 (patch)
tree0e080f8830f8ca2e90a0609682716eb902ab9ec2
parenta16af323c3df473306deac2e2c119466d46f748e (diff)
transition: Default to/from to previous/current scene, respectively.
Sane defaults make the transitions easier to use. * starling/transition.scm (<transition>)[scene-from]: Default to current-scene. [scene-to]: Default to previous scene.
-rw-r--r--starling/transition.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/starling/transition.scm b/starling/transition.scm
index f673d9c..826032e 100644
--- a/starling/transition.scm
+++ b/starling/transition.scm
@@ -66,8 +66,10 @@
;;;
(define-class <transition> (<scene>)
- (scene-from #:getter scene-from #:init-keyword #:from)
- (scene-to #:getter scene-to #:init-keyword #:to)
+ (scene-from #:getter scene-from #:init-keyword #:from
+ #:init-thunk current-scene)
+ (scene-to #:getter scene-to #:init-keyword #:to
+ #:init-thunk previous-scene)
(duration #:getter duration #:init-keyword #:duration))
(define-generic do-transition)