i made a new macro for twine!
first, you can check out a small demo that uses it.
this is for twine 1.4, and is a macro that adds some slightly more advanced form controls, with inline displays. this adds three new macros:
a
a
(if you want text to be refreshed based on multiple toggle groups, you can nest
an example of use:
would display two sets of three selections, with a "$var is ..." blurb beneath each one that's automatically updated every time you change a value.
( here's the code )
first, you can check out a small demo that uses it.
this is for twine 1.4, and is a macro that adds some slightly more advanced form controls, with inline displays. this adds three new macros:
<<toggle>>
, <<block>>
, and <<endblock>>
.a
<<toggle>>
is in the form <<toggle $varname groupname value display>>
, and it generates some clickable text ("display
"), which, when clicked, will set $varname
to value
. if there are multiple toggles with the same groupname
, clicking one will deselect any others.a
<<block>>
is in the form <<block groupname>>...<<endblock>>
. when a toggle is selected, it will also inline refresh the text inside any blocks with matching groupnames.(if you want text to be refreshed based on multiple toggle groups, you can nest
<<block>>
s with no issue.)an example of use:
<<toggle $foo foo foo_a "foo a">>
<<toggle $foo foo foo_b "foo b">>
<<toggle $foo foo foo_c "foo c">>
<<block foo>>\
$foo is <<print $foo>>
<<endblock>>
<<toggle $bar bar 1 one>>
<<toggle $bar bar 2 two>>
<<toggle $bar bar 3 three>>
<<block bar>>\
$bar is <<print $bar>>
<<endblock>>
would display two sets of three selections, with a "$var is ..." blurb beneath each one that's automatically updated every time you change a value.
( here's the code )