show #:selection example

This commit is contained in:
nixo 2021-01-09 14:10:52 +01:00
parent 55ce63ae71
commit 35598805e7
1 changed files with 6 additions and 3 deletions

View File

@ -79,17 +79,20 @@
(nixo (nixo
(format #f "You chose the element number: ~a\n" (format #f "You chose the element number: ~a\n"
(menu (menu
'("Yes" "Maybe" "No way")))) '("Yes" "Maybe" "No way")
#:selection 1)))
(nixo "Click it again!") (nixo "Click it again!")
(nixo (nixo
(format #f "You chose the element: ~a\n" (format #f "You chose the element: ~a\n"
(menu (menu
'(("Yes") ("Maybe") ("No way"))))) '(("Yes") ("Maybe") ("No way"))
#:selection 0)))
(nixo "Once more!") (nixo "Once more!")
(nixo (nixo
(format #f "You chose the element: ~a\n" (format #f "You chose the element: ~a\n"
(menu (menu
'(("Yes" . yep) ("Maybe" . maybe) ("No way" . nope))))) '(("Yes" . yep) ("Maybe" . maybe) ("No way" . nope))
#:selection 2)))
*unspecified*)) *unspecified*))
scene) scene)
(init-menu! #s32(100 100) #s32(0 50) simple-button #:scene scene) (init-menu! #s32(100 100) #s32(0 50) simple-button #:scene scene)