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T09PT09PT09TV1dXW1tbW1dXV1dbW1dXV1dXV1dXW1tbX19bW2NjY2NjX19fX2NjY8/4JGSk1PUNHSEtLTU1NTk1NTExOTk9PTk1NSisiEwL16+Pg3dvZ2NnX1tfV1NbW1tXX1tX3/wsfKzc/QUVGSEZGSkhISElJSUpJSkxLS0pKLyMVB/nr5eLd2dfX1NTR0dPS0NHQ0dLQ1fH9ChsoMTc8P0JAQUFCQkREQ0RCQUJBQkJDRUIkGAn76+HZ1dDQz83MzMrIyMnKycnJycfIyMrT6vcFEyApLzQ3OTo7PD09PTw9PT09PT8+Pz8+Pj0fFQf47N7X1M/Ny8vJyMnHx8jIx8nKyMnIx8jIyMvq9AISICsyODs6Ozw/PT8/P0BAPz5AQD4+QEBBQUEkFwz97ODY0s7NzMzLzMvMzczKzMrMy8vLysvJy8rO7fgGFiIuNDo9PT4/Pj8/QEFCQEFCQkFCQkRFREVEQyUbDf7x5uA="

{card:Index}
image:"%%[encoded data, 7668 characters]"
script:"Index.0"
{widgets}
field1:{"type":"field","size":[132,17],"pos":[322,133],"locked":1,"font":"menu","show":"invert","border":0,"align":"center","value":"Dialogs for Decker"}
button1:{"type":"button","size":[60,20],"pos":[442,312],"script":"Index.1","text":"Next","style":"rect"}
field2:{"type":"field","size":[248,55],"pos":[14,142],"locked":1,"show":"transparent","border":0,"value":{"text":["Decker Dialogizer is  a module (\"dd\") which provides customizable, aesthetically pleasant modal dialog boxes for use in Visual Novels and similar interactive content.\n\n","Index:"],"font":["","menu"],"arg":["",""]}}
index:{"type":"field","size":[243,117],"pos":[16,197],"locked":1,"volatile":1,"script":"Index.2","scrollbar":1}
version:{"type":"field","size":[42,14],"pos":[16,318],"locked":1,"volatile":1,"border":0}

{script:Index.0}
on view do
 bullet:image["%%IMG0AAYADQAAAAB49Pz8/HgAAAA="]
 i:select c:key t:value..widgets.title.text where value..widgets.title from deck.cards
 index.value:raze each row in rows i
  rtext.make["" "" bullet],
  rtext.make["  "],
  rtext.make[("%s\n" format row.t) "mono" row.c]
 end
 version.text:"v%0.1f" format deck.modules.dd.version
end
{end}

{script:Index.1}
on click do
 t.Prev:"SlideRight"
 t.Next:"SlideLeft"
 t.Index:"BoxOut"
 go[me.text t[me.text] 15]
end
{end}

{script:Index.2}
on link val do
 go[val "BoxIn" 15]
end
{end}

{card:say}
{widgets}
button1:{"type":"button","size":[60,20],"pos":[442,312],"script":"Index.1","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,20],"pos":[10,312],"script":"Index.1","text":"Prev","style":"rect"}
title:{"type":"field","size":[492,17],"pos":[10,28],"locked":1,"font":"menu","show":"invert","border":1,"align":"center","value":"dd.open[], dd.say[], dd.close[]"}
ex1:{"type":"field","size":[244,101],"pos":[10,56],"style":"code","value":"dd.open[deck]\ndd.say[\"Hello, World!\"]\ndd.close[]"}
field2:{"type":"field","size":[236,101],"pos":[266,56],"locked":1,"border":0,"value":"Before you can show text in a modal dialog, you must call dd.open[] with the deck as the first argument.\n\nYou can then use dd.say[] with a string to actually place text in the dialog.\n\nWhen you're finished using the dialog, call dd.close[]."}
button3:{"type":"button","size":[60,20],"pos":[266,137],"script":"say.0","text":"Try It!"}
field3:{"type":"field","size":[236,129],"pos":[266,169],"locked":1,"border":0,"value":"If you call dd.say[] several times, you'll get a series of dialog boxes to click through.\n\n\n\n\n\nAlways remember to call dd.close[] when you're finished with a sequence, and before moving to another card. If you halt a script manually, you can call dd.close[] from the Listener to clean up the dialog."}
ex2:{"type":"field","size":[244,57],"pos":[10,169],"style":"code","value":"dd.open[deck]\ndd.say[\"The first message.\"]\ndd.say[\"The second message.\"]\ndd.close[]"}
button4:{"type":"button","size":[60,20],"pos":[266,206],"script":"say.1","text":"Try It!"}
button5:{"type":"button","size":[60,20],"pos":[78,312],"script":"Index.1","text":"Index","style":"rect"}

{script:say.0}
on click do
 eval[ex1.text () 1]
end
{end}

{script:say.1}
on click do
 eval[ex2.text () 1]
end
{end}

{card:ask}
{widgets}
button1:{"type":"button","size":[60,20],"pos":[442,312],"script":"Index.1","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,20],"pos":[10,312],"script":"Index.1","text":"Prev","style":"rect"}
title:{"type":"field","size":[492,17],"pos":[10,28],"locked":1,"font":"menu","show":"invert","border":1,"align":"center","value":"dd.ask[]"}
ex1:{"type":"field","size":[266,242],"pos":[10,56],"style":"code","value":"dd.open[deck]\ndd.say[\"Ready...\"]\nr:dd.ask[\n \"...aaand, Shoot:\"\n (\"Rock\",\"Paper\",\"Scissors\")\n]\nif r~0\n dd.say[\"I had rock, too. Tie!\"]\nelseif r~1\n dd.say[\"Paper beats my rock. You win.\"]\nelse\n dd.say[\"My rock beats scissors. I win!\"]\nend\ndd.close[]"}
field2:{"type":"field","size":[217,72],"pos":[285,56],"locked":1,"border":0,"value":"The dd.ask[] function accepts a string as a prompt and a list of strings as options.\n\nThe user will be allowed to choose one of the options, and dd.ask[] will then return the index of the selected option, counting from 0."}
button3:{"type":"button","size":[60,20],"pos":[285,278],"script":"say.0","text":"Try It!"}
button5:{"type":"button","size":[60,20],"pos":[78,312],"script":"Index.1","text":"Index","style":"rect"}

{card:chat}
image:"%%IMG2AgABVgD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/A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AAEBAQABAQEAAQEBAAEBAQABAQEAAQEBAAEBAQAFAQEABgECAAEBAQABAQEAAQEBAAEBAQABAQEAAQEBAAEBAQABAQEAAQEBAAEBAQABAQEAAQEBAAEBAQABARQA/wChAQQAAQEBABwBAQAMAQEAHAEBAA4BBAD/AKIBAwACAQEAHAEBAAUBAQAGAQEAHAEBAA4BAwD/AKMBAgADAQEAHAEBAAwBAQAcAQEADgECAP8ApAEBAAQBAQAcAQEADAEBABwBAQAOAQEA/wCqAQEAHAEOABwBAQD/ALkBAQBGAQEA/wC5AQEARgEBAP8AuQEBAEYBAQD/ALkBAQBGAQEA/wC5AQEARgEBAP8AuQFIAP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/API="
{widgets}
button1:{"type":"button","size":[60,20],"pos":[442,312],"script":"Index.1","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,20],"pos":[10,312],"script":"Index.1","text":"Prev","style":"rect"}
title:{"type":"field","size":[492,17],"pos":[10,28],"locked":1,"font":"menu","show":"invert","border":1,"align":"center","value":"dd.chat[]"}
ex1:{"type":"field","size":[266,242],"pos":[10,56],"style":"code","value":"ct:\"Chickens are fantastic animals.\n\nDid you know chickens can lay an egg roughly every 24 hours?\n\nThey stop laying when they moult.\"\nbt:\"Honestly I don't know much about bugs.\"\n\ndd.open[deck]\nr:dd.chat[\n \"Ask me anything you like.\"\n raze insert q a with\n  \"Tell me about chickens.\" ct\n  \"Tell me about bugs.\"     bt\n  \"I have to go.\" 0\n end\n]\ndd.say[\"goodbye, then.\"]\ndd.close[]"}
field2:{"type":"field","size":[217,154],"pos":[285,56],"locked":1,"border":0,"value":"The dd.chat[] function makes certain patterns of dialog trees built out of dd.ask[] and dd.say[] easier to write.\n\nThe dd.chat[] function accepts a string as a prompt and a dictionary mapping strings (options) to responses. It will display a dialog box (as with dd.ask[]), and then consult the response corresponding to the user's choice. If the response is a number, dd.chat[] will return it immediately. Otherwise, dd.say[] will be called with the response, the selected choice will be removed from the list of choices, and the user will be prompted again with dd.ask[] until no options remain."}
button3:{"type":"button","size":[60,20],"pos":[285,278],"script":"say.0","text":"Try It!"}
button5:{"type":"button","size":[60,20],"pos":[78,312],"script":"Index.1","text":"Index","style":"rect"}

{card:configuration}
{widgets}
button1:{"type":"button","size":[60,20],"pos":[442,312],"script":"Index.1","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,20],"pos":[10,312],"script":"Index.1","text":"Prev","style":"rect"}
title:{"type":"field","size":[492,17],"pos":[10,28],"locked":1,"font":"menu","show":"invert","border":1,"align":"center","value":"dd.open[] configuration"}
ex1:{"type":"field","size":[244,242],"pos":[10,56],"style":"code","value":"o:()\no.fcolor:colors.magenta\no.bcolor:colors.yellow\ndd.open[deck o]\ndd.say[\"Fancy Colors!\"]\ndd.close[]\n\no:()\no.tfont:\"menu\"\no.align:\"center\"\ndd.open[deck o]\ndd.say[\"Bigger Text,\\nCentered!\"]\ndd.close[]\n\no:()\no.next:image[\n \"%%IMG0AAgACf+BvaWtob+A/w==\"\n]\ndd.open[deck o]\ndd.say[\"Custom Next Icon!\"]\ndd.close[]"}
field2:{"type":"field","size":[236,242],"pos":[266,56],"locked":1,"border":0,"value":"The dd.open[] function can optionally be given a second argument: a dictionary with configuration options.\n\nYou can customize the appearance of a dialog box by setting appropriate keys in the dictionary:\n\n- fcolor: foreground color (number)\n- bcolor: background color (number)\n- tfont: main text font (string or font)\n- bfont: button font for ask[] (string or font)\n- align: alignment of text (\"left\", \"right\", \"center\")\n- next: icon used to advance say[] (image)\n\nIf you're using custom styling extensively, consider defining configuration dictionaries or wrapper functions for dd.say[] and dd.ask[] in a deck-level script!"}
button3:{"type":"button","size":[60,20],"pos":[266,278],"script":"say.0","text":"Try It!"}
button5:{"type":"button","size":[60,20],"pos":[78,312],"script":"Index.1","text":"Index","style":"rect"}

{card:style}
{widgets}
button1:{"type":"button","size":[60,20],"pos":[442,312],"script":"Index.1","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,20],"pos":[10,312],"script":"Index.1","text":"Prev","style":"rect"}
title:{"type":"field","size":[492,17],"pos":[10,28],"locked":1,"font":"menu","show":"invert","border":1,"align":"center","value":"dd.style[], dd.getstyle[]"}
ex1:{"type":"field","size":[244,242],"pos":[10,56],"style":"code","value":"a:()\na.fcolor:colors.white\na.bcolor:colors.black\nb:()\nb.fcolor:colors.black\nb.bcolor:colors.red\n\ndd.open[deck a]\ndd.say[\"Style A\"]\n\ndd.style[b]\ndd.say[\"Switch to:\\nStyle B\"]\n\ndd.style[a]\ndd.say[\"Back to Style A!\"]\ndd.close[]\n"}
field2:{"type":"field","size":[236,242],"pos":[266,56],"locked":1,"border":0,"value":"You can also change the configuration of a dialog sequence in mid-stream with dd.style[].\n\nThe dd.style[] function takes a single dictionary as an argument and accepts all the same options as dd.open[].\n\nThe dd.getstyle[] function can be called with no arguments to retrieve a dictionary of all the current style settings. This can be useful if you need to save the current style and restore it at a later time."}
button3:{"type":"button","size":[60,20],"pos":[266,278],"script":"say.0","text":"Try It!"}
button5:{"type":"button","size":[60,20],"pos":[78,312],"script":"Index.1","text":"Index","style":"rect"}

{card:show}
{widgets}
button1:{"type":"button","size":[60,20],"pos":[442,312],"script":"Index.1","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,20],"pos":[10,312],"script":"Index.1","text":"Prev","style":"rect"}
title:{"type":"field","size":[492,17],"pos":[10,28],"locked":1,"font":"menu","show":"invert","border":1,"align":"center","value":"dd.show[]"}
ex1:{"type":"field","size":[244,122],"pos":[10,56],"style":"code","value":"dd.open[deck]\ndd.say[\"First message.\"]\n\ndd.show[0]\nsleep[30]\ndd.show[1]\n\ndd.say[\"Second message.\"]\ndd.close[]\n"}
field2:{"type":"field","size":[236,242],"pos":[266,56],"locked":1,"border":0,"value":"Sometimes you may want to temporarily hide a dialog box without actually removing it.\n\ndd.show[0] hides the dialog box,\nand dd.show[1] reveals it."}
button3:{"type":"button","size":[60,20],"pos":[267,158],"script":"say.0","text":"Try It!"}
button5:{"type":"button","size":[60,20],"pos":[78,312],"script":"Index.1","text":"Index","style":"rect"}

{card:borders}
{widgets}
button1:{"type":"button","size":[60,20],"pos":[442,312],"script":"Index.1","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,20],"pos":[10,312],"script":"Index.1","text":"Prev","style":"rect"}
title:{"type":"field","size":[492,17],"pos":[10,28],"locked":1,"font":"menu","show":"invert","border":1,"align":"center","value":"custom borders"}
ex1:{"type":"field","size":[244,82],"pos":[10,56],"style":"code","scroll":10,"value":"o:()\no.border.image:windoid.copy[]\no.border.margin:14,16,8,6\no.fcolor:colors.black\no.bcolor:colors.white\ndd.open[deck o]\ndd.say[\"Image Border.\"]\ndd.close[]"}
field2:{"type":"field","size":[236,238],"pos":[266,56],"locked":1,"border":0,"value":"The \"border\" property can be used to configure a custom border image for dialog boxes. The \"border.image\" property should be any image, and \"border.margin\" specifies numeric offsets from the left, top, right, and bottom edge, respectively.\n\n\n\n\nAlternatively, you can use any contraption prototype in your deck. (They have the same fields.)\n\n\n\n\n\n\n\n\nIn either case, the border image will be automatically divided into 9 regions based on the margins and regions will be tiled appropriately to suit the required size."}
button3:{"type":"button","size":[60,20],"pos":[267,209],"script":"say.1","text":"Try It!"}
field5:{"type":"field","size":[44,12],"pos":[18,239],"locked":1,"border":0,"style":"plain","align":"center","value":"windoid:"}
paper1:{"type":"contraption","size":[165,48],"pos":[89,253],"def":"paper","widgets":{}}
field3:{"type":"field","size":[34,14],"pos":[157,239],"locked":1,"border":0,"style":"plain","align":"center","value":"paper:"}
ex2:{"type":"field","size":[244,81],"pos":[10,148],"style":"code","value":"o:()\no.border:deck.contraptions.paper\no.fcolor:colors.black\no.bcolor:colors.white\ndd.open[deck o]\ndd.say[\"Prototype Border.\"]\ndd.close[]\n"}
button4:{"type":"button","size":[60,20],"pos":[267,118],"script":"say.0","text":"Try It!"}
windoid:{"type":"canvas","size":[36,24],"pos":[22,253],"locked":1,"border":0,"image":"%%IMG2ACQAGAAlASIAAgEBIB8BAgACAQEgAQEBIAEBByABAQEgAQEBIAEBASABAQEgAQEBIAEBASABAQEgAQEBIAEBASABAQEgAQECAAIBASADAQEgBQEBIBUBAgACAQEgAQEBIAEBASAFAQEgAQEBIAEBASABAQEgAQEBIAEBASABAQEgAQEBIAEBASABAQEgAQEBIAEBAgACAQEgAwEBIAUBASAVAQIAAgEBIAEBASABAQEgBQEBIAEBASABAQEgAQEBIAEBASABAQEgAQEBIAEBASABAQEgAQEBIAEBASABAQIAAgEBIAMBASAFAQEgFQECAAIBASABAQEgAQEHIAEBASABAQEgAQEBIAEBASABAQEgAQEBIAEBASABAQEgAQEBIAEBASABAQIAAgEBIB8BAgACASIAAgEBIB8BAgACAQEgHwECAAIBASAfAQIAAgEBIB8BAgACAQEgHwECAAIBASAfAQIAAgEBIB8BAgACAQEgHwECAAIBASAfAQIAAgEiAAIBIgAl","scale":1}
button5:{"type":"button","size":[60,20],"pos":[78,312],"script":"Index.1","text":"Index","style":"rect"}

{card:buttonborders}
image:"%%IMG2AgABVgD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8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A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8AxBPSAP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AMo="
{widgets}
button1:{"type":"button","size":[60,20],"pos":[442,312],"script":"Index.1","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,20],"pos":[10,312],"script":"Index.1","text":"Prev","style":"rect"}
title:{"type":"field","size":[492,17],"pos":[10,28],"locked":1,"font":"menu","show":"invert","border":1,"align":"center","value":"button borders, alignment"}
ex1:{"type":"field","size":[244,241],"pos":[10,56],"scrollbar":0,"style":"code","value":"o.bborder:deck.contraptions.rbutton\no.fcolor:colors.black\no.bcolor:colors.white\ndd.open[deck o]\ndd.ask[\n \"Which button do you like?\"\n (\"First\",\"Second\",\"Third\")\n]\n\no.bborder:deck.contraptions.bracket\no.balign:\"left\"\ndd.style[o]\ndd.ask[\n \"How about this?\"\n (\"This one\",\"Nah, This one\")\n]\ndd.close[]\n"}
field2:{"type":"field","size":[236,172],"pos":[266,56],"locked":1,"border":0,"value":"The \"bborder\" property can be used to configure a custom border image for the buttons in dd.ask[] dialogs. This works just like the \"border\" property, and can be either a dictionary with an image and explicit margin, or a contraption.\n\nThe image used for the \"bborder\" property should be partially transparent, to allow the foreground fill color to show through when a button is clicked, highlighting the button.\n\nThe \"balign\" property works just like the \"align\" property but controls the alignment of text within dd.ask[] buttons, and can be set to \"left\", \"right\", or \"center\" (the default)."}
button3:{"type":"button","size":[60,20],"pos":[266,222],"script":"say.0","text":"Try It!"}
button5:{"type":"button","size":[60,20],"pos":[78,312],"script":"Index.1","text":"Index","style":"rect"}
rbutton1:{"type":"contraption","size":[64,25],"pos":[314,272],"def":"rbutton","widgets":{}}
field1:{"type":"field","size":[44,12],"pos":[324,259],"locked":1,"border":0,"style":"plain","align":"center","value":"rbutton:"}
arrow1:{"type":"contraption","size":[21,13],"pos":[417,278],"def":"bracket","widgets":{}}
field3:{"type":"field","size":[44,12],"pos":[404,259],"locked":1,"border":0,"style":"plain","align":"center","value":"bracket:"}

{card:windowsize}
{widgets}
button1:{"type":"button","size":[60,20],"pos":[442,312],"script":"Index.1","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,20],"pos":[10,312],"script":"Index.1","text":"Prev","style":"rect"}
title:{"type":"field","size":[492,17],"pos":[10,28],"locked":1,"font":"menu","show":"invert","border":1,"align":"center","value":"window size"}
ex1:{"type":"field","size":[244,238],"pos":[10,56],"scrollbar":1,"style":"code","value":"o:()\no.size:200,0\ndd.open[deck o]\ndd.say[\"Fixed width, with a somewhat longer line to ensure text wrapping is actually happening as intended.\"]\n\no.size:0,100\ndd.style[o]\ndd.say[\"Fixed height.\"]\n\no.size:200,120\ndd.style[o]\ndd.say[\"Fixed width and height, with a somewhat longer line to ensure text wrapping is actually happening as intended.\"]\n\ndd.ask[\"Question...\" (\"one\",\"two\")]\n\no.size:0,0\ndd.style[o]\ndd.close[]"}
field2:{"type":"field","size":[236,238],"pos":[266,56],"locked":1,"border":0,"value":"The \"size\" property can be used to configure a fixed width and/or height for dialog boxes. This can be particularly useful for making custom borders look their best.\n\nThe size property is specifed as a (width,height) pair. If either is 0, it is treated as the default behavior: full screen width minus a small margin, and the height required to display the specified text. If either is nonzero, that axis will take on exactly the specified size.\n\nIf you fix the size of the dialog box, it's up to you to ensure that your text (including option buttons for dd.ask[]) will fit properly! "}
button4:{"type":"button","size":[60,20],"pos":[266,274],"script":"say.0","text":"Try It!"}
button5:{"type":"button","size":[60,20],"pos":[78,312],"script":"Index.1","text":"Index","style":"rect"}

{card:windowpos}
{widgets}
button1:{"type":"button","size":[60,20],"pos":[442,312],"script":"Index.1","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,20],"pos":[10,312],"script":"Index.1","text":"Prev","style":"rect"}
title:{"type":"field","size":[492,17],"pos":[10,28],"locked":1,"font":"menu","show":"invert","border":1,"align":"center","value":"window position"}
ex1:{"type":"field","size":[244,238],"pos":[10,56],"scrollbar":1,"style":"code","value":"o:()\no.pos:\"center\"\ndd.open[deck o]\ndd.say[\"A vertically and horizontally centered dialog box.\\nNeat, eh?\"]\n\no.size:100,0\no.pos:\"place1\"\ndd.style[o]\ndd.say[\"Over Here...wih enough text to wrap multiple lines...\"]\n\no.pos:\"place2\"\ndd.style[o]\ndd.say[\"...Or over here!\"]\n\no.pos:\"place1\"\no.size:150,0\ndd.style[o]\ndd.ask[\"A question up here, long enough for word wrapping?\" (\"Red\",\"Blue\")]\n\no.size:0,0\no.pos:0\ndd.style[o]\ndd.close[]"}
field2:{"type":"field","size":[236,238],"pos":[266,56],"locked":1,"border":0,"value":"The \"pos\" property can be used to configure a custom location for the dialog box on the card.\n\nIf the pos property is 0 (the default), the dialog box will be horizontally centered on the bottom edge of the card.\n\nIf the pos property is the string \"center\", the dialog box will be horizontally and vertically centered on the card.\n\nOtherwise, if the pos property is the name of a widget on the current card, the dialog box will be centered on that widget. This combines nicely with the \"size\" property."}
button4:{"type":"button","size":[60,20],"pos":[266,274],"script":"say.0","text":"Try It!"}
button5:{"type":"button","size":[60,20],"pos":[78,312],"script":"Index.1","text":"Index","style":"rect"}
place1:{"type":"button","size":[8,8],"pos":[92,96],"show":"none"}
place2:{"type":"button","size":[8,8],"pos":[416,155],"show":"none"}

{card:textspeed}
{widgets}
button1:{"type":"button","size":[60,20],"pos":[442,312],"script":"Index.1","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,20],"pos":[10,312],"script":"Index.1","text":"Prev","style":"rect"}
title:{"type":"field","size":[492,17],"pos":[10,28],"locked":1,"font":"menu","show":"invert","border":1,"align":"center","value":"text speed"}
ex1:{"type":"field","size":[244,164],"pos":[10,56],"style":"code","value":"\ndd.open[deck o]\n\ndd.style[().speed:1]\ndd.say[chickens.text]\n\ndd.style[().speed:3]\ndd.say[chickens.text]\n\ndd.style[().speed:7]\ndd.say[chickens.text]\n\ndd.close[]"}
field2:{"type":"field","size":[236,238],"pos":[266,56],"locked":1,"border":0,"value":"Normally, dd.say[] will display all the text in each dialog box instantly. If the\"speed\" property is set, dialogizer will animate the text appearing word-by-word.\n\nA non-zero \"speed\" indicates the number of frames (60ths of a second) which will elapse between each word appearing, breaking words on whitespace.\n\nIf a user clicks while text is animating, the animation will immediately finish."}
button4:{"type":"button","size":[60,20],"pos":[267,200],"script":"say.0","text":"Try It!"}
button5:{"type":"button","size":[60,20],"pos":[78,312],"script":"Index.1","text":"Index","style":"rect"}
chickens:{"type":"field","size":[244,59],"pos":[10,235],"locked":1,"value":"The chicken (Gallus gallus domesticus) is a large and round short-winged bird, domesticated from the red junglefowl of Southeast Asia around 8,000 years ago. Most chickens are raised for food, providing meat and eggs; others are kept as pets or for cockfighting."}
field3:{"type":"field","size":[92,14],"pos":[160,294],"locked":1,"border":0,"style":"plain","align":"right","value":"(source: wikipedia)"}

{card:soundeffects}
{widgets}
button1:{"type":"button","size":[60,20],"pos":[442,312],"script":"Index.1","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,20],"pos":[10,312],"script":"Index.1","text":"Prev","style":"rect"}
title:{"type":"field","size":[492,17],"pos":[10,28],"locked":1,"font":"menu","show":"invert","border":1,"align":"center","value":"sound effects"}
ex1:{"type":"field","size":[244,204],"pos":[10,56],"style":"code","value":"o.osound:\"scrape\"\no.nsound:\"click\"\no.asound:\"clap\"\ndd.open[deck o]\n\ndd.say[\"Line 1\"]\ndd.say[\"Line 2\"]\ndd.ask[\"Question\" (\"A\",\"B\",\"C\")]\ndd.say[\"Line 3\"]\n\no.tsound:(\"talk1\",\"talk2\",\"talk3\")\no.speed:3\ndd.style[o]\ndd.say[textspeed.widgets.chickens.text]\n\ndd.close[]"}
field2:{"type":"field","size":[236,238],"pos":[266,56],"locked":1,"border":0,"value":"There are several properties available which indicate that dialogizer should play sounds at various times:\n\n- \"osound\": dd.open[] is called.\n- \"nsound\": user advanced to the next dd.say[] dialog.\n- \"asound\": user made a choice in a dd.ask[] dialog.\n- \"tsound\": played each word while text animates.\n\nSounds may be specified by name (a string) or by value (a sound interface). If you set either property to a list, an element will be chosen randomly each time a sound needs to be played."}
button4:{"type":"button","size":[60,20],"pos":[267,240],"script":"say.0","text":"Try It!"}
button5:{"type":"button","size":[60,20],"pos":[78,312],"script":"Index.1","text":"Index","style":"rect"}

{card:richtext}
{widgets}
button1:{"type":"button","size":[60,20],"pos":[442,312],"script":"Index.1","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,20],"pos":[10,312],"script":"Index.1","text":"Prev","style":"rect"}
title:{"type":"field","size":[492,17],"pos":[10,28],"locked":1,"font":"menu","show":"invert","border":1,"align":"center","value":"rich text"}
ex1:{"type":"field","size":[244,101],"pos":[10,56],"style":"code","value":"dd.open[deck]\ndd.say[source.value]\ndd.close[]"}
field2:{"type":"field","size":[236,242],"pos":[266,56],"locked":1,"border":0,"value":{"text":["The dd.say[] and dd.ask[] functions can also operate on rich text, with multiple fonts and inline images.\n\nIn dd.say[], blank lines (\"\\n\\n\") will automatically split text up across multiple boxes.\n\n\n\n\n\n\n\n\n\nThe ","rtext"," interface can be used to create rich text programmatically, but it's even easier to store and edit rich text in a field widget, as in this example.\n\nUsing this approach, you can organize your text however you wish: across cards, interspersed with notes, or in invisible fields on the card where it will be used."],"font":["","",""],"arg":["","https://beyondloom.com/decker/decker.html#rtextinterface",""]}}
button3:{"type":"button","size":[60,20],"pos":[266,137],"script":"say.0","text":"Try It!"}
source:{"type":"field","size":[244,112],"pos":[10,186],"value":{"text":["","Pippi:"," Do you think we'll get treats for this cameo?\n\n","Galena:"," It is truly the least father could do for us.\nI hope we shall receive bugs.\n\n","Pippi:"," Yesss. Bugs, or perhaps corn."],"font":["","menu","","menu","","menu",""],"arg":["","","","","","",""]}}
field5:{"type":"field","size":[100,12],"pos":[89,172],"locked":1,"border":0,"style":"plain","align":"center","value":"source:"}
button5:{"type":"button","size":[60,20],"pos":[78,312],"script":"Index.1","text":"Index","style":"rect"}

{card:interpolation}
{widgets}
button1:{"type":"button","size":[60,20],"pos":[442,312],"script":"Index.1","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,20],"pos":[10,312],"script":"Index.1","text":"Prev","style":"rect"}
title:{"type":"field","size":[492,17],"pos":[10,28],"locked":1,"font":"menu","show":"invert","border":1,"align":"center","value":"string interpolation"}
ex1:{"type":"field","size":[244,95],"pos":[10,56],"style":"code","value":"o.names.user:username.text\no.names.exclaim:\"bizarre\"\n\ndd.open[deck o]\ndd.say[source.value]\ndd.close[]\n"}
field2:{"type":"field","size":[236,156],"pos":[266,56],"locked":1,"border":0,"value":"If the configuration dictionary for dd.open[] contains a sub-dictionary called \"names\", they will be used to replace format patterns:\n\n\n\nin the text provided to dd.say[] and dd.ask[].\n\n\n\n\n\nNote that format patterns in rich text must be within a contiguous span of styling to be replaced properly!"}
button3:{"type":"button","size":[60,20],"pos":[267,141],"script":"say.0","text":"Try It!"}
source:{"type":"field","size":[244,91],"pos":[10,212],"scrollbar":0,"value":{"text":["","Galena:"," Your name is %[user]s?\nHow %[exclaim]s!\n\n","Galena:"," I've never heard of a human named %[user]s.\n\n","Galena:"," Granted, I don't get out much..."],"font":["","menu","","menu","","menu",""],"arg":["","","","","","",""]}}
field5:{"type":"field","size":[100,12],"pos":[89,198],"locked":1,"border":0,"style":"plain","align":"center","value":"source:"}
field3:{"type":"field","size":[48,16],"pos":[283,95],"locked":1,"style":"code","value":"%[key]s"}
username:{"type":"field","size":[244,16],"pos":[10,177],"value":"Hamilton Butters"}
field4:{"type":"field","size":[100,12],"pos":[89,163],"locked":1,"border":0,"style":"plain","align":"center","value":"username:"}
field6:{"type":"field","size":[61,16],"pos":[344,95],"locked":1,"style":"code","value":"%[key]02i"}
field7:{"type":"field","size":[67,16],"pos":[418,95],"locked":1,"style":"code","value":"%[key]8.3f"}
button5:{"type":"button","size":[60,20],"pos":[78,312],"script":"Index.1","text":"Index","style":"rect"}

{card:commands}
script:"commands.0"
{widgets}
button1:{"type":"button","size":[60,20],"pos":[442,312],"script":"Index.1","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,20],"pos":[10,312],"script":"Index.1","text":"Prev","style":"rect"}
title:{"type":"field","size":[492,17],"pos":[10,28],"locked":1,"font":"menu","show":"invert","border":1,"align":"center","value":"commands"}
ex1:{"type":"field","size":[244,40],"pos":[10,56],"style":"code","value":"dd.open[deck]\ndd.say[source.value]\ndd.close[]"}
field2:{"type":"field","size":[236,242],"pos":[266,56],"locked":1,"border":0,"value":"A line in a rich text field which starts with a \"!\" is a command.\n\nCommands must be separated from text and other commands by a blank line.\n\nCommands send a \"command\" event to the current card, with all the text following the \"!\" in the same paragraph provided as an argument.\n\nIn this way, commands make it possible to add custom scripted behavior interspersed with dialog. For example, controlling styling or scene changes.\n\nTake a look at this card's script to see how this example changes styles and fires a primitive alert[] modal. In your own projects, you can give every card its own custom command handler, or write a single command handler in the deck script that works everywhere. (Or both!)"}
button3:{"type":"button","size":[60,20],"pos":[267,278],"script":"say.0","text":"Try It!"}
source:{"type":"field","size":[244,183],"pos":[10,115],"value":{"text":["!light\n\n","Pippi:"," Do you think we'll get treats for this cameo?\n\n!dark\n\n","Galena:"," It is truly the least father could do for us.\nI hope we shall receive bugs.\n\n!light\n\n!alert[2+3]\n\n","Pippi:"," Yesss. Bugs, or perhaps corn."],"font":["","menu","","menu","","menu",""],"arg":["","","","","","",""]}}
field5:{"type":"field","size":[100,12],"pos":[89,101],"locked":1,"border":0,"style":"plain","align":"center","value":"source:"}
button5:{"type":"button","size":[60,20],"pos":[78,312],"script":"Index.1","text":"Index","style":"rect"}

{script:commands.0}
on command x do
 if x~"light"
  o.fcolor:colors.black
  o.bcolor:colors.white
  dd.style[o]
 elseif x~"dark"
  o.fcolor:colors.white
  o.bcolor:colors.black
  dd.style[o]
 else
  eval[x () 1]
 end
end
{end}

{card:eventpumping}
script:"eventpumping.0"
{widgets}
button1:{"type":"button","size":[60,20],"pos":[442,312],"script":"Index.1","text":"Next","style":"rect"}
button2:{"type":"button","size":[60,20],"pos":[10,312],"script":"Index.1","text":"Prev","style":"rect"}
title:{"type":"field","size":[492,17],"pos":[10,28],"locked":1,"font":"menu","show":"invert","border":1,"align":"center","value":"event pumping"}
ex1:{"type":"field","size":[244,140],"pos":[10,56],"style":"code","value":"dd.open[deck]\ndd.say[source.value]\ndd.close[]\n\ntarget.clear[]"}
field2:{"type":"field","size":[236,204],"pos":[266,56],"locked":1,"border":0,"value":"The dd.ask[] and dd.say[] functions are synchronous; they take control of Decker and block any normal Decker events from firing while they're active. This is a useful property in many cases: it makes it easy to display modal dialogs in sequence, and under the control of if...else...end statements.\n\nWhile they're waiting, the dd functions will periodically send an \"animate\" event to the current card. This gives your scripts the opportunity to do work, like animating background elements.\n\n\n\n\n\n\nHave a look at this card's script to see how it uses the event for this example!"}
button3:{"type":"button","size":[60,20],"pos":[266,176],"script":"say.0","text":"Try It!"}
source:{"type":"field","size":[115,74],"pos":[10,226],"value":{"text":["","Pippi:"," Check out that animated swirly thing! I think I'm getting dizzy..."],"font":["","menu",""],"arg":["","",""]}}
field5:{"type":"field","size":[100,14],"pos":[17,210],"locked":1,"border":0,"style":"plain","align":"center","value":"source:"}
target:{"type":"canvas","size":[112,74],"pos":[142,226],"locked":1,"volatile":1,"scale":1}
field3:{"type":"field","size":[100,14],"pos":[149,210],"locked":1,"border":0,"style":"plain","align":"center","value":"target:"}
button5:{"type":"button","size":[60,20],"pos":[78,312],"script":"Index.1","text":"Index","style":"rect"}

{script:eventpumping.0}
on animate do
 t:sys.frame
 target.clear[]
 c:target.size/2                  # center of canvas
 r:c[0]*.6+.4*sin 0.02*t          # radius of the pattern
 a:(0.005*t)+(pi/0.5*16)*range 16 # angle per wedge
 p:flip c+flip r*unit a           # points around a circle
 each x i in p
  if 2%i target.poly[c x p[(count p)%1+i]] end # draw every other wedge
 end
end
{end}

{card:conclusions}
image:"%%IMG2AgABVgD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8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wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wBh"
script:"eventpumping.0"
{widgets}
button2:{"type":"button","size":[60,20],"pos":[10,312],"script":"Index.1","text":"Prev","style":"rect"}
title:{"type":"field","size":[492,17],"pos":[10,28],"locked":1,"font":"menu","show":"invert","border":1,"align":"center","value":"a complete cutscene"}
field2:{"type":"field","size":[492,49],"pos":[10,52],"locked":1,"border":0,"align":"center","value":"We've reviewed all the functionality of Dialogizer separately, with examples.\nNow let's have a look at using these features together for a complex program!\n\nThe logic for this example is broken into three main pieces:"}
button3:{"type":"button","size":[64,20],"pos":[52,198],"script":"conclusions.0","text":"Try It!"}
field3:{"type":"field","size":[122,68],"pos":[23,116],"locked":1,"border":1,"align":"center","value":"The script of our button:\n\n(High-level flow, scene transitions.)"}
field4:{"type":"field","size":[122,68],"pos":[196,116],"locked":1,"border":1,"align":"center","value":"The \"on command\" event handler of the 'stage' card:\n\n(Commands for controlling animation and styling.)"}
field5:{"type":"field","size":[122,68],"pos":[364,116],"locked":1,"border":1,"align":"center","value":"The prose in the 'source' field on this card:\n\n(Dialog and the sequence of commands controlling the action.)"}
source:{"type":"field","size":[315,93],"pos":[102,234],"scrollbar":1,"value":{"text":["!enter galena\n\n!light\n\n","Galena:"," Sister!\n\n","Galena:"," I have observed an insect!\n\n!enter pippi\n\n!dark\n\n","Pippi:","  are you certain of this?\n\n!light\n\n!galena squint\n\n","Galena:"," I am most certain!\n\n","Galena:"," It was an arthropod of considerable volume and mass!\n\n!galena shock\n\n","Galena:"," THERE!\n\n","Galena:"," The winged magenta ovoid!\n\n!dark\n\n!pippi squint\n\n","Pippi:","  By my apprehension your quarry is merely an unusually colored egg.\n\n","Pippi:","  No doubt, you-\n\n!both up\n\n!eggbug\n\n!both shock\n\n!dark\n\n","Pippi:"," MAKE HASTE, SISTER!\n\n","Pippi:"," ONWARD TO BATTLE!"],"font":["","menu","","menu","","menu","","menu","","menu","","menu","","menu","","menu","","menu","","menu","","menu",""],"arg":["","","","","","","","","","","","","","","","","","","","","","",""]}}
field6:{"type":"field","size":[100,14],"pos":[203,218],"locked":1,"border":0,"style":"plain","align":"center","value":"source:"}
button1:{"type":"button","size":[60,20],"pos":[442,312],"script":"Index.1","text":"Index","style":"rect"}

{script:conclusions.0}
on click do
 stage.event["command" "reset"]
 go[stage "BoxIn"]
 dd.open[deck o]
 dd.say[source.value]
 dd.close[]
 go["Back" "BoxOut"]
end
{end}

{card:stage}
image:"%%[encoded data, 29196 characters]"
script:"stage.0"
{widgets}
bug:{"type":"canvas","size":[94,91],"pos":[-94,29],"locked":1,"show":"none","border":0,"image":"%%IMG2AF4AWwA8IA4ASSAaAEIgHgA9ICMAOiAOAQwgCwA5IAkBFiAHADcgBwEbIAYALyAEAAMgBQEIIBABBiAGACQgDwABIAUBBiAWAQQgBgAgIBcBAyAcAQMgBQAfIBgBAyAcAQQgBAAeIBABASAIAQMgAwEBIBkBAyAFABoBAQABIAgBDCAGAQMgAgEDIBgBAyAFABkBAyAFARAg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rAQQgBQACIAQBBA0EAQgNCwEJDSsBBCAFAAIgBAEEDQUBBw0LAQkNKwEEIAUAAiAEAQQNBgEFDQ0BBw0sAQMgBgACIAQBBA0ZAQUNLAEEIAYAAyAEAQMNCgEBDQgBAg01AQQgBgADIAQBAw0JAQMNAgEBDQMBBA00AQQgBQAEIAQBBA0IAQMNAQEDDQEBBA00AQQgBgAEIAQBBA0IAQsNNQEEIAUABSAEAQQNCQEKDTQBBSAFAAUgBAEFDQkBAw0CAQMNNQEEIAYABSAFAQUNQgEHIAYABSAGAQQNQQEIIAcABSAGAQQNQQEIIAcABSAGAQQNQAEKIAYABSAGAQQNPgEMIAUABiAFAQQNPQEFIAEBCCAEAAcgBQEEDTsBBiAFAQQgBAAIIAQBBA0wAQINCAEGIAkBASAFAAcgBQEEDS4BBA0FAQcgEAAHIAUBBQ0uAQQNAgEGIBMACCAEAQcNGwEBDRABCyAIAAIgCQAIIAUBCQ0YAQMNDgEKIAkABCAHAAggBgEMDRUBAw0IAQ8gCQAUIAQBBSACARYNAwEdIAYAFyADAQUgBAEtIAMBBSAFABggBAEDIA4BISAHAQQgBAAaIBsBByAEAQQgEwEDIAUAGiAlAQQgEwEEIAQAGyAFAAMgHAEEIBQBAyAEABwgAwAGIAQAAiAUAQQgDAAFIAQBAiAFADIgDAEEIAMADiAFAQEgBQA8IAIBBCADAA4gCwA8IAIBAyAEAA8gCQA9IAIBAyAEABAgCAA9IAMBASAFABEgBgA/IAcAFCADAEEgBgBaIAMALA==","scale":1}
galena:{"type":"canvas","size":[243,239],"pos":[268,103],"locked":1,"show":"transparent","border":0,"image":"%%IMG2APMA7wBDAQUA6gEKAOYBDgDkAQ8A4wEKIAIBBADPAQkACgEHIAYBBADMAQ0ACAEGIAgBBADKARAABgEGIAkBBADJARIABAEGIAoBBADIAQggBgEGAAIBBiALAQQAxwEGIAoBDCALAQUAxgEGIAwBCSANAQwAvwEFIA4BByAOAQ0AvQEFIBEBBCAPAQ4AvAEEICUBDwC7AQQg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BrAQQEfgEHAGkBBQSAAQYAaAEEBIMBBQBnAQQEhAEFAGUBBQSFAQUAZAEEBIcBBgBiAQQEiAEGAGEBBASJAQYAYAEEBIoBBgBeAQUEjAEGAFwBBASOAQYAWgEFBI8BBgBZAQQEkQEGAFgBBASTAQUAVwEEBJQBBQBVAQUElQEFAFQBBASXAQQAVAEEBJcBBgBSAQQEmAEGAFABBQSYARIARAEEBJoBFwA+AQQEmwEbADkBBAScARwANwEEBKoBEAA1AQQEsAEMADMBBAS1AQgAMgEEBLcBBwAxAQQEuQEHAC8BBAS7AQYALgEEBLwBBwAsAQQEvQEHACsBBAS/AQcAKQEEBMABBwAoAQQEwgEGACcBBATDAQYAJgEEBMQBBgAlAQQExgEFACQBBQTGAQQAJQEEBMYBBQAkAQQExwEEACQBBATHAQUAIwEFBMcBCQAfAQQExwEMABwBBATIAQwAGwEFBMgBDAAbAQQEzgEHABoBBATRAQUAGQEFBNEBBgAXAQUE0gEGABcBBATTAQYAFgEFBNMBBQAXAQQE1AEFABYBBQTUAQUAFQEFBNUBBAAWAQQE1QEFABUBBQTVAQUAFAEFBNYBBg==","scale":1}
pippi:{"type":"canvas","size":[225,293],"pos":[0,49],"locked":1,"show":"transparent","border":0,"image":"%%[encoded data, 5012 characters]","scale":1}

{script:stage.0}
on lerp t a b do a+(b-a)*0|1&t end
on interval n f do each t in (range 1+n)/n f[t] sleep[] end end
on puppet target src do
 target.show:"transparent"
 s:puppets.widgets[src]
 target.size:s.size
 target.paste[s.copy[]]
 target.pos:target.pos[0],card.size[1]-target.size[1]
end

on command x do
 if x~"reset"
  bug.show:"none"
  galena.show:"none"
  pippi.show:"none"

 elseif x~"light"
  o.nsound:"clap"
  o.speed:2
  o.fcolor:colors.black
  o.bcolor:colors.white
  dd.style[o]
 
 elseif x~"dark"
  o.nsound:"click"
  o.speed:2
  o.fcolor:colors.white
  o.bcolor:colors.black
  dd.style[o]
 
 elseif x~"eggbug"
  dd.show[0]
  bug.show:"transparent"
  interval[120 on _ t do
   bug.pos:lerp[t card.size[0]+bug.size[0] (-bug.size[0])],(10+30*sin 15*t)
  end]
  sleep[30]
  bug.show:"none"
  dd.show[1]
  
 elseif x~"enter galena"
  puppet[galena "galena_neutral"]
  interval[30 on _ t do
   galena.pos:card.size-lerp[t 0 galena.size[0]],galena.size[1]
  end]
  
 elseif x~"enter pippi"
  dd.show[0]
  puppet[pippi "pippi_sphere"]
  interval[30 on _ t do
   pippi.pos:0,card.size[1]-lerp[t 0 pippi.size[1]]
  end]
  dd.show[1]
  
 elseif x~"galena shock"
  puppet[galena "galena_alert"]

 elseif x~"galena squint"
  puppet[galena "galena_squint"]
  
 elseif x~"pippi squint"
  puppet[pippi "pippi_squint"]
  puppet[galena "galena_up"]
  
 elseif x~"both up"
  puppet[pippi "pippi_up"]
  puppet[galena "galena_up"]
  
 elseif x~"both shock"
  puppet[galena "galena_up"]
  puppet[pippi  "pippi_alert"]
 end
end
{end}

{card:puppets}
script:"puppets.0"
{widgets}
pippi_sphere:{"type":"canvas","size":[248,162],"pos":[15,30],"locked":1,"border":1,"image":"%%IMG2APgAogBNAQMACAEDAOkBBQAGAQUA5wEHAAUBBgAIAQEA3QEDIAEBAwAFAQcABgEIANcBAyABAQMABAEDIAIBAwAGAQsA1AEDIAIBAwADAQMgAgEDAAYBDADTAQMgAgEDAAMBAyADAQMABQENANIBAyADAQMAAgEDIAMBAwAFAQMgAwEIANEBAyADAQMAAgEDIAMBAwAFAQMgBwEFANABAyAEAQMAAQEDIAMBAwAFAQMgCAEFAM8BAyAEAQMAAQEDIAQBAwAEAQMgCQEFAM4BAyAFAQYgBAEDAAQBAyAJAQUAzgEDIAUBBiAEAQMABAEDIAoBBADOAQMgBgEFIAQBAwAEAQMgCgEFAM0BAyAHAQUgBAEDAAMBAyALAQUAoQEkAAcBAyAIAQQgBAEDAAMBAyALAQoAlwEtAAMBBCAIAQMgBQEDAAIBAyAMAQsAkgE3IAkBAyAEAQMAAgEDIA0BCwCOATogCQEDIAQBAwAC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QoBFCAWAQUNTQEEAAsNUwEFIAUBBQ0NARMgEwEHDU0BBQAKDVMBDw0OARIgEgEHDU8BBAAKDVQBDQ0QARIgDwEIDVABBQAJDVUBCw0SAQsNAQEHIAsBCg1RAQQACQ1WAQkNIAEJIAYBCw1SAQUACA2BAQkgAgELDVUBBAAIDYIBFA1WAQQACA2DARINVwEEAAgNhwEMDVkBBQAHDYkBBw1dAQQABw3tAQQABw3tAQQABw3tAQQABw3tAQQABw3tAQQABw3tAQQABw3tAQQABw3tAQQABw3tAQQABw3sAQUABw3sAQQACA3sAQQACA3sAQQACA3sAQQACA3sAQQACA3rAQUACA3rAQQACQ3qAQUACQ3qAQsAAw3pAQ0AAg3pAQ0AAg3qAQ0AAQ3zAQQAAQ3zAQQAAQ3zAQQAAQ3zAQQAAQ3zAQQAAQ3zAQQAAQ3zAQUN9AEEDfQBBA30AQQN9AEEDfQBBA30AQQN9AEEDfQBBA30AQQN9AEEDfQBBA3zAQUN8wEEAAE=","scale":1}
pippi_alert:{"type":"canvas","size":[225,293],"pos":[35,97],"locked":1,"image":"%%[encoded data, 5012 characters]","scale":1}
pippi_up:{"type":"canvas","size":[248,162],"pos":[25,54],"locked":1,"image":"%%IMG2APgAogBNAQMACAEDAOkBBQAGAQUA5wEHAAUBBgAIAQEA3QEDIAEBAwAFAQcABgEIANcBAyABAQMABAEDIAIBAwAGAQsA1AEDIAIBAwADAQMgAgEDAAYBDADTAQMgAgEDAAMBAyADAQMABQENANIBAyADAQMAAgEDIAMBAwAFAQMgAwEIANEBAyADAQMAAgEDIAMBAwAFAQMgBwEFANABAyAEAQMAAQEDIAMBAwAFAQMgCAEFAM8BAyAEAQMAAQEDIAQBAwAEAQMgCQEFAM4BAyAFAQYgBAEDAAQBAyAJAQUAzgEDIAUBBiAEAQMABAEDIAoBBADOAQMgBgEFIAQBAwAEAQMgCgEFAM0BAyAHAQUgBAEDAAMBAyALAQUAoQEkAAcBAyAIAQQgBAEDAAMBAyALAQoAlwEtAAMBBC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EAIsBBQRgAQUAiQEFBGIBBACIAQYEYgEFAIcBBQRkAQQAhgEFBGUBBQCFAQQEZgEFAIQBBQRnAQQAgwEFBGgBBQCCAQQEagEFAIABBQRrAQUAfgEFBG0BBAB+AQQEbgEFAHwBBQRuAQcAeQEFBHABBwB4AQUEcgEGAHcBBAR0AQYAdQEFBHYBBwByAQQEeAEHAHEBBAR5AQcAbwEFBHoBCABtAQQEfQEHAGwBBAR+AQcAagEFBIABBgBpAQQEgwEFAGgBBASEAQUAZgEFBIUBBQBlAQQEhwEGAGMBBASIAQYAYgEEBIkBBgBhAQQEigEGAF8BBQSMAQYAXQEEBI4BBgBbAQUEjwEGAFoBBASRAQYAWQEEBJMBBQBYAQQElAEFAFYBBQSVAQUAVQEEBJcBBABVAQQElwEGAFMBBASYAQYAUQEFBJgBEgBFAQQEmgEXAD8BBASbARsAOgEEBJwBHAA4AQQEqgEQADYBBASwAQwANAEEBLUBCAAzAQQEtwEHADIBBAS5AQcAMAEEBLsBBgAvAQQEvAEHAC0BBAS9AQcALAEEBL8BBwAqAQQEwAEHACkBBATCAQYAKAEEBMMBBgAnAQQExAEGACYBBATGAQUAJQEFBMYBBAAmAQQExgEFACUBBATHAQQAJQEEBMcBBQAkAQUExwEJACABBATHAQwAHQEEBMgBDAAcAQUEyAEMABwBBATOAQcAGwEEBNEBBQAaAQUE0QEGABgBBQTSAQYAGAEEBNMBBgAXAQUE0wEFABgBBATUAQUAFwEFBNQBBQAWAQUE1QEEABcBBATVAQUAFgEFBNUBBQAVAQUE1gEG","scale":1}

{script:puppets.0}
on click do
 me.index:999
end
{end}

{card:card2}
image:"%%[encoded data, 8268 characters]"

{module:dd}
description:"Display sequential, styled modal dialogs for visual novels."
version:1.4
{script}
# state/constants:
local host:0
local canvas:0
local padding:10
local margin:20
local arrow:image["%%IMG0AAsABv/gf8A/gB8ADgAEAA=="]

# config:
local tfont:"body"
local bfont:"body"
local align:"left"
local balign:"center"
local fcolor:32
local bcolor:1
local next:arrow
local speed:0
local names:() dict ()
local border:0
local bborder:0
local pad:()
local bpad:()
local osound:"" # open box
local nsound:"" # advance to next box
local asound:"" # make a choice
local tsound:"" # talk
local dsize:(0,0)
local dpos:0

on ifmt x do x format names end
on fmt x do update text:ifmt @ text from rtext.cat[x] end
on tween a b t do a+(b-a)*0|1&t end
on rin x pos size do min(x>pos),(x<pos+size) end
on tick do host.card.event["animate"] sleep[] end

on sfx x do
 play[if "list"~typeof x random[x] else x end]
end

on draw_border do
 canvas.clear[]
 if border.type~"image"
  canvas.segment[border 0,0,canvas.size (range pad)]
 else
  canvas.pattern:bcolor
  canvas.rect[0,0 canvas.size]
  canvas.pattern:fcolor
  canvas.box[0,0 canvas.size]
 end
end

on repos pos size do
 if dpos~"center"
  .5*host.card.size-size
 elseif dpos in host.card.widgets
  t:host.card.widgets[dpos]
  t.pos+.5*t.size-size
 else pos
 end
end

on resize height do
 cs0:canvas.size
 cs1:((host.card.size[0]-2*margin) unless dsize[0]),height
 cp0:canvas.pos
 cp1:repos[(.5*host.card.size[0]-cs1[0]),host.card.size[1]-cs1[1]+margin cs1]
 each t in .2*range 6
  canvas.size:tween[cs0 cs1 t]
  canvas.pos :tween[cp0 cp1 t]
  draw_border[]
  tick[]
 end
end

module.open:on open deck etc do
 if canvas & canvas.show~"transparent" close[] end
 host:deck
 canvas:host.card.add["canvas" "dd_overlay"]
 style[etc]
 canvas.size:((host.card.size[0]-2*margin) unless dsize[0]),0
 canvas.pos:repos[(.5*host.card.size[0]-canvas.size[0]),host.card.size[1]-margin canvas.size]
 canvas.show:"transparent"
 canvas.border:0
 sfx[osound]
end

module.style:on style etc do
 fcolor:if "fcolor" in etc etc.fcolor else 32       end
 bcolor:if "bcolor" in etc etc.bcolor else 1        end
 tfont :if "tfont"  in etc etc.tfont  else "body"   end
 bfont :if "bfont"  in etc etc.bfont  else "body"   end
 align :if "align"  in etc etc.align  else "left"   end
 balign:if "balign" in etc etc.balign else "center" end
 names :if "names"  in etc etc.names  else ()dict() end
 next  :if "next"   in etc etc.next   else arrow    end
 speed :if "speed"  in etc etc.speed  else 0        end
 osound:if "osound" in etc etc.osound else ""       end
 nsound:if "nsound" in etc etc.nsound else ""       end
 asound:if "asound" in etc etc.asound else ""       end
 tsound:if "tsound" in etc etc.tsound else ""       end
 dsize: if "size"   in etc etc.size   else (0,0)    end
 dpos:  if "pos"    in etc etc.pos    else 0        end
 border:etc.border.image.copy[]
 pad:"ltrb" dict 4 take if !0~etc.border.margin etc.border.margin else padding end
 bborder:etc.bborder.image.copy[]
 bpad:"ltrb" dict 4 take if !0~etc.bborder.margin etc.bborder.margin else (2,10,2,10) end
 if balign~"left"  balign:"center_left"  end
 if balign~"right" balign:"center_right" end
end

module.getstyle:on getstyle do
 raze insert k v with
  "fcolor"  fcolor
  "bcolor"  bcolor
  "tfont"   tfont
  "bfont"   bfont
  "align"   align
  "balign"  (("center_left","center_right","center") dict ("left","right","center"))[balign]
  "names"   names
  "next"    next
  "speed"   speed
  "osound"  osound
  "nsound"  nsound
  "asound"  asound
  "tsound"  tsound
  "size"    dsize
  "pos"     dpos
  "border"  (("image","margin")dict((list  border),(list range  pad)))
  "bborder" (("image","margin")dict((list bborder),(list range bpad)))
 end
end

module.show:on show x do
 canvas.toggle["transparent" x]
end

module.close:on close do
 if canvas & canvas.show~"transparent" resize[0] end
 host.card.remove[canvas]
 host:canvas:0
end

module.say:on say text do
 text:fmt @ rtext.split["\n\n" text]
 canvas.font:tfont
 each seg i in text
  t:rtext.string[seg]
  if t[0]~"!"
   host.card.event["command" (1 drop t)]
  else
   dim:canvas.textsize[seg (canvas.size[0] unless dsize[0])-(pad.l+pad.r)]
   szh:dim[1]+(pad.t+pad.b)+next.size[1]
   if dsize[0] dim[0]:dsize[0]-pad.l+pad.r end
   resize[szh unless dsize[1]]
   canvas.pattern:fcolor
   if speed
    host.modules.pt.value.talk[1]
    splits: extract index,1+count t where value in (" ","\n") from "" split t
    si:0 db:0 while si<count splits
     sfx[tsound]
     each in range speed
      if pointer.down si:-1+count splits db:1 end
      tick[]
     end
     draw_border[]
     canvas.pattern:fcolor
     canvas.text[rtext.span[seg 0,splits[si]] pad.l,pad.t,dim ("top_%s" format align)]
     si:si+1
    end
    host.modules.pt.value.talk[0]
    if db
     while pointer.held|pointer.down tick[] end
    end
   else
    canvas.text[seg pad.l,pad.t,dim ("top_%s" format align)]
   end
   a:next.copy[].map[1 dict fcolor]
   p:canvas.size-(pad.r,pad.b)+next.size
   on wait do
    if 2%floor sys.frame/10
     canvas.paste[a p 1]
    else
     canvas.pattern:bcolor
     canvas.rect[p a.size]
    end
    tick[]
   end
   while !pointer.held|pointer.down wait[] end
   sfx[nsound]
   while  pointer.held|pointer.up   wait[] end
  end
 end
end

module.ask:on ask text choices do
 seg:fmt[text]
 canvas.font:tfont
 dim:canvas.textsize[seg (canvas.size[0] unless dsize[0])-(pad.l+pad.r)]
 if (1>count choices)|0~choices choices:list "error: empty choice list for dd.ask!" end
 segs:fmt @ choices
 canvas.font:bfont
 dims:each choice in segs
  canvas.textsize[choice (canvas.size[0] unless dsize[0])-(bpad.t+bpad.b)+(pad.t+pad.b)][1]+(bpad.t+bpad.b)
 end
 szh:dim[1]+(pad.t+pad.b)+(sum dims)+(padding*count dims)
 if dsize[0] dim[0]:dsize[0]-pad.l+pad.r end
 resize[szh unless dsize[1]]
 local r:-1 while -1~r
  draw_border[]
  canvas.font:tfont
  canvas.pattern:fcolor
  canvas.text[seg (pad.l,pad.t),dim ("top_%s" format align)]
  c:dim[1]+pad.t+padding
  ow:canvas.size[0]-(pad.l+pad.r)
  each choice i in segs
   local rpos:pad.l,c
   local rsize:ow,dims[i]
   local tpos:rpos+bpad.l,bpad.t
   local tsize:rsize-((bpad.l+bpad.r),(bpad.t+bpad.b))
   # active background (invert label)
   canvas.pattern:fcolor
   if (pointer.held|pointer.down|pointer.up)&rin[pointer.pos-canvas.pos rpos rsize]
    if bborder.type~"image"
     canvas.rect[rpos rsize]
    else
     canvas.rect[rpos+2 rsize-4]
    end
    if pointer.up r:i sfx[asound] end
    canvas.pattern:bcolor
   end
   # label
   canvas.font:bfont
   canvas.text[choice tpos,tsize balign]
   # border
   if bborder.type~"image"
    canvas.segment[bborder rpos,rsize (range bpad)]
   else
    canvas.pattern:fcolor
    canvas.box[rpos rsize]
   end
   c:c+padding+dims[i]
  end
  tick[]
 end
 r
end

module.chat:on chat text choices do
 r:0
 st:getstyle[]
 while count choices
  k:keys choices
  style[st]
  v:ask[text k]
  vv:choices[k[v]]
  if "number"~typeof vv
   choices:()
   r:vv
  else
   choices:k[v] drop choices
   say[vv]
  end
 end
 r
end
{end}

{contraption:paper}
size:[266,42]
resizable:1
margin:[10,10,15,20]
description:"a resizable scrap of ragged paper."
image:"%%IMG2AQoAKgH/AQoAAQEBIP8gCAEBAAEBASD/IAgBAQABAQEg/yAHAQIAAQEBIP8gBwEBAAIBASD/IAYBAgACAQEg/yAGAQIAAgEBIP8gBQECAAMBASD/IAYBAQADAQEg/yAGAQIAAgEBIP8gBwEBAAIBASD/IAcBAQACAQEg/yAGAQIAAgEBIP8gBgEBAAMBASD/IAUBAgADAQEg/yAFAQIAAwEBIP8gBQEBAAQBASD/IAUBAQAEAQEg/yAEAQEABQEBIP8gAwECAAUBASD/IAMBAgAFAQEg/yADAQMABAEBIP8gBAEDAAMBASD/IAUBAwACAQEg/yAGAQIAAgEBIP8gBgECAAIBASD/IAYBAQADAQEg/yAFAQEABAEBIP8gBAECAAQBASD/IAQBAwADAQEg/yAFAQIAAwEBIP8gBQEDAAIBASD/IAYBAgACAQEg/yAGAQMAAQEBIGIBAiBWAQMgSQEBAAIBASBZAQIgBQEFICwBAiAmAQggFQEFICoBAgACAQEgDAEHIAkBBCAmAQIgDgEGIAMBAgACAQMgJwEHIAQBAyALAQkgCAECAAMBDiAIAQwgCgEDIBoBAgACAQEgCQENIAUBCSACAQUgGgEEIAsBBAACAQUABQEEIBkBBiAEAQUAAgELIAYBDiAFAQIACAEOIAMBBAAFAQggAwELIAoBAiAJAQMAAQEBIAQBBwAHAQkABAEQIAMBCSAJAQEAAgEDIAgBAwAGAQMABwEKIBEBDAAHAQQAAwEFIAMBAwAJAQgAEwEIAAwBCgADARggBAECAAEBASACAQYADQEFAAkBAgAFARQgBQEBAAQBCwAUAQogDAEDAAYBBAASAQYADgEFABgBAwARAQMACwEKAAIBDQABAQQAKwEDAAkBCQAGAQgAHQERAB8BAwBgAQYAAgECADwBBQAuAQwAjQ=="

{contraption:rbutton}
size:[31,28]
resizable:1
margin:[7,7,8,8]
description:"a resizable rounded button."
image:"%%IMG2AB8AHCAFARQgCQECIBQBAiAGAQEgAgAUIAIBASAEAQEgAQAYIAEBASADAQEgAQAYIAEBAiABAQEgAQAaIAEBASABAQEgAQAaIAEBAyABABogAQEDIAEAGiABAQMgAQAaIAEBAyABABogAQEDIAEAGiABAQMgAQAaIAEBAyABABogAQEDIAEAGiABAQMgAQAaIAEBAyABABogAQEDIAEAGiABAQMgAQAaIAEBAyABABogAQEDIAEAGiABAQMgAQAaIAEBAiABAQEgAQAYIAEBAyABAQEgAQAYIAEBAiADAQEgAgAUIAIBAyADAQMgFAEEIAUBGSAIARUgBQ=="

{contraption:bracket}
size:[35,9]
resizable:1
margin:[10,3,3,3]
description:"a resizable bracket-shaped outline."
image:"%%IMG2ACMACSAkAQUgHgECIAYAGCADAQIgBgAYIAMBAiAGABggAwECIAYAGCADAQIgBgAYIAMBBSBA"

