;; -*- mode: scheme -*- (bg-reset BG_1) (define (One) (clickable-text `(markup "This is a basic piece of text using the default " "colors and the default font. It has one clickable " "link. Notice how there is a bit of a mouseover effect " "and some fadeout. Fancy.\n\n" (a (@ (action ,Two)) "click me")))) (define (Two) (clickable-text `(markup "Right now, we're using a driver called " (span (@ (font "Courier")) "clickable-text") ". This driver has some convenient font decorations.\n" (b " BOLD ") (big " BIG\n") (i " ITALIC ") (s " STRIKETHROUGH\n") (sup " SUPERSCRIPT ") (sub " SUBSCRIPT\n") (small " SMALL ") (tt " MONOSPACE\n") (u " UNDERLINE ") "\n\n" (a (@ (action ,Three)) "click me")))) (define (Three) (clickable-text `(markup "The " (span (@ (font "Courier")) "clickable-text") " driver has other font decorations.\n" (span (@ (font "Sans")) " Different font\n") (span (@ (fgcolor "#FF00FF")) " Foreground Color\n") (span (@ (bgcolor "#FFFF00")) " Background Color\n") "\n\n" (a (@ (action ,Four)) "click me")))) (define (Four) (set-font "Fira Sans 16,Sans 16") (set-font-color "yellow3") (clickable-text `(markup "You can also set the default font and font foreground color " "for the rest of the game with the " (span (@ (font "Courier")) "set-font") " and " (span (@ (font "Courier")) "set-font-color") " commands\n\n" "\n\n" (a (@ (action ,Five)) "click me")))) (define (Five) (set-backdrop "DarkSlateGray4") (clickable-text `(markup "You can imagine each screen a series of layers. On the " "top layer is this here text. On the bottom layer, behind " "the text is the " (span (@ (font "Courier")) "backdrop") ". You can set the color of " "the backdrop with the " (span (@ (font "Courier")) "set-backdrop") " command." "\n\n" (a (@ (action ,Six)) "click me")))) (define (Six) (load-image-file "shop.jpg" VRAM_A) (bg-setup BG_1 VRAM_A) (bg-set-brightness 0.4) (set-font-color "green") (clickable-text `(markup "In between the text on top and the backdrop on the bottom, " "there is the " (i "background") ".\n" "You can place images there." "\n\n" (a (@ (action ,Seven)) "click me")))) (define (Seven) (load-audio-file "waltz2.ogg" VRAM_B) (audio-channel-play 1 VRAM_B) (clickable-text `(markup "You can play audio, so long as your audio files are " "Ogg Vorbis. I only had the patience for one audio filter. " "\n\n" "I need you to slightly impressed, because audio in a pain " "in the backside.\n\n" (a (@ (action ,Eight)) "yup, that's audio")))) (define (Eight) (bg-reset BG_1) (audio-channel-stop 1) (clickable-text `(markup "That's really all you need for a Twine-like game." "\n\n" "I declare this here to be an alpha-level product." "\n\n" "Are you impressed?." "\n\n" (a (@ (action ,Yes)) "Yes!") "\n" (a (@ (action ,No)) "No!")))) (define (No) (clickable-text '(markup (small "It is a good thing that I don't live my life seeking validation ") (small "from the likes of you.")))) (define (Yes) (clickable-text '(markup (big "Finally, for the first time in my life, some validation!")))) (One)