Add logo and input mappings to intro level.
This commit is contained in:
parent
204cf8f62d
commit
2ce709b95b
2 changed files with 30 additions and 8 deletions
24
game.scm
24
game.scm
|
@ -672,8 +672,30 @@
|
|||
(set-transform! context 1.0 0.0 0.0 1.0 0.0 0.0)
|
||||
(scale! context *canvas-scale* *canvas-scale*)
|
||||
(draw-current-effect 'pre)
|
||||
|
||||
(match *state*
|
||||
((or 'play 'interstitial) (draw-level))
|
||||
((or 'play 'interstitial)
|
||||
(draw-level)
|
||||
;; Display input mappings on the title screen/first level.
|
||||
(when (= *level-idx* 0)
|
||||
(let ((cx1 (/ game-width 4.0))
|
||||
(cx2 (* game-width 0.75))
|
||||
(baseline (/ game-height 2.0)))
|
||||
(set-fill-color! context "#ffffff")
|
||||
(set-text-align! context "center")
|
||||
(set-font! context "normal 16px monogram")
|
||||
(fill-text context "keyboard:"
|
||||
cx1 (- baseline 32.0))
|
||||
(fill-text context "arrows -> move"
|
||||
cx1 (- baseline 16.0))
|
||||
(fill-text context "Z -> undo"
|
||||
cx1 baseline)
|
||||
(fill-text context "touchscreen:"
|
||||
cx2 (- baseline 32.0))
|
||||
(fill-text context "dpad -> move"
|
||||
cx2 (- baseline 16.0))
|
||||
(fill-text context "A -> undo"
|
||||
cx2 baseline))))
|
||||
('win (draw-win)))
|
||||
(draw-current-effect 'post)
|
||||
(request-animation-frame draw-callback)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue