fix missing accumulators, use new init-menu!
This commit is contained in:
parent
5cbb11439d
commit
ecb36f5d72
15
run.scm
15
run.scm
|
@ -69,6 +69,8 @@
|
||||||
#:callback simple-button-callback))
|
#:callback simple-button-callback))
|
||||||
(simple-menu
|
(simple-menu
|
||||||
(make-menu '() #:pos #s32(100 100) #:spacing #s32(0 50)
|
(make-menu '() #:pos #s32(100 100) #:spacing #s32(0 50)
|
||||||
|
#:accumulator
|
||||||
|
(cute menu-fold <> *unspecified* (lambda (val seed) val))
|
||||||
#:button-prototype simple-button))
|
#:button-prototype simple-button))
|
||||||
(nixo (make-speaker "nixo")))
|
(nixo (make-speaker "nixo")))
|
||||||
(init-script!
|
(init-script!
|
||||||
|
@ -84,6 +86,7 @@
|
||||||
(make-menu '(("Select me!")
|
(make-menu '(("Select me!")
|
||||||
("Or me!")
|
("Or me!")
|
||||||
("No, select me!"))
|
("No, select me!"))
|
||||||
|
#:accumulator (cute menu-fold <> '() cons)
|
||||||
#:prototype radio-menu))))
|
#:prototype radio-menu))))
|
||||||
(nixo "Choose as many as you want!")
|
(nixo "Choose as many as you want!")
|
||||||
(nixo
|
(nixo
|
||||||
|
@ -92,6 +95,7 @@
|
||||||
(make-menu '(("A" 0)
|
(make-menu '(("A" 0)
|
||||||
("B" 1)
|
("B" 1)
|
||||||
("C" 2))
|
("C" 2))
|
||||||
|
#:accumulator (cute menu-fold <> '() cons)
|
||||||
#:prototype checkbox-menu))))
|
#:prototype checkbox-menu))))
|
||||||
(nixo "Choose as many as you want!")
|
(nixo "Choose as many as you want!")
|
||||||
(nixo
|
(nixo
|
||||||
|
@ -100,6 +104,7 @@
|
||||||
(make-menu '(("A" 0 (pressed))
|
(make-menu '(("A" 0 (pressed))
|
||||||
("B" 1 (selected))
|
("B" 1 (selected))
|
||||||
("C" 2 (pressed)))
|
("C" 2 (pressed)))
|
||||||
|
#:accumulator (cute menu-fold <> '() cons)
|
||||||
#:prototype checkbox-menu))))
|
#:prototype checkbox-menu))))
|
||||||
(nixo "Click it!")
|
(nixo "Click it!")
|
||||||
(nixo
|
(nixo
|
||||||
|
@ -115,8 +120,14 @@
|
||||||
(menu (("Yes" yep) ("Maybe" maybe) ("No way" nope)))))
|
(menu (("Yes" yep) ("Maybe" maybe) ("No way" nope)))))
|
||||||
*unspecified*))
|
*unspecified*))
|
||||||
scene)
|
scene)
|
||||||
(scene-add-object! scene 'menu simple-menu) ; roughly equivalent to init-menu! below
|
(init-menu! simple-menu) ; equal to
|
||||||
;; (init-menu! #s32(100 100) #s32(0 50) simple-button #:scene scene)
|
;; (scene-add-object! scene 'menu simple-menu)
|
||||||
|
;; roughly equivalent to init-menu! below
|
||||||
|
;; (init-menu! #:pos #s32(100 100) #:spacing #s32(0 50)
|
||||||
|
;; #:prototype simple-button
|
||||||
|
;; #:accumulator (cute menu-fold <> *unspecified*
|
||||||
|
;; (lambda (val seed) val))
|
||||||
|
;; #:scene scene)
|
||||||
(init-text! 10 300 280 font font #:scene scene)))
|
(init-text! 10 300 280 font font #:scene scene)))
|
||||||
|
|
||||||
(run-game
|
(run-game
|
||||||
|
|
Loading…
Reference in New Issue