summaryrefslogtreecommitdiff
path: root/bonnie-bee/splash.scm
diff options
context:
space:
mode:
Diffstat (limited to 'bonnie-bee/splash.scm')
-rw-r--r--bonnie-bee/splash.scm32
1 files changed, 23 insertions, 9 deletions
diff --git a/bonnie-bee/splash.scm b/bonnie-bee/splash.scm
index 3b8fba6..98239d6 100644
--- a/bonnie-bee/splash.scm
+++ b/bonnie-bee/splash.scm
@@ -14,23 +14,37 @@
(define-class <splash> (<scene-2d>))
+(define %text-color (rgb #xfee761))
+
(define-method (on-boot (splash <splash>))
(set-cameras! splash)
(attach-to splash
+ (make <sprite>
+ #:texture darkness-image)
+ (make <label>
+ #:rank 1
+ #:position (vec2 (/ %game-width 2.0) 120.0)
+ #:font monogram-font
+ #:color %text-color
+ #:align 'center
+ #:vertical-align 'center
+ #:text "Made with Chickadee")
(make <label>
- #:name 'label
- #:font chonkly-font
- #:color black
+ #:rank 1
+ #:position (vec2 (/ %game-width 2.0) 100.0)
+ #:font monogram-font
+ #:color %text-color
#:align 'center
#:vertical-align 'center
- #:position (vec2 (/ %game-width 2.0) (/ %game-height 2.0)))))
+ #:text "https://dthompson.us/projects/chickadee.html")))
(define-method (on-enter (splash <splash>))
- (unless (getenv "SKIP_SPLASH")
- (run-script splash
- (set! (text (& splash label)) "made with chickadee")
- (sleep 0.5)
- (replace-scene (current-kernel) (make <game>)))))
+ (run-script splash
+ (unless (getenv "SKIP_SPLASH")
+ (fade-in splash 1.0)
+ (sleep 1.0)
+ (fade-out splash 1.0))
+ (replace-scene (current-kernel) (make <game>))))
(define (launch-game)
(boot-kernel (make <kernel>