SugarCube textbox default value

Is there any way to display the default value in textbox as a variable?

For example:
→ Creates an automatically focused text box which modifies $pie and forwards to the "Cakes" passage
What's your favorite pie? <<textbox "$pie" "Blueberry" "Cakes" autofocus>>

Can the "Blueberry" entry here be displayed as whatever $pie is instead?

Cause this means if you change $pie to cherry, the next time you encounter the text box, you'll still get the default value of Blueberry, and pressing enter will reset $pie back to Blueberry.

Comments

  • edited May 2015
    What's your favorite pie? <<textbox "$pie" $pie "Cakes" autofocus>>
    

    Variable Substitution (right near the top):
    Variable substitution occurs automatically in SugarCube, so all macros that take arguments can take $variables as arguments. Occasionally, this means that $variables might need to be quoted to protect them from automatic variable substitution for macros which need the name of the $variable and not its value; these instances are noted.
  • edited May 2015
    Oh right, I was putting quote marks around it. Thanks. :)
Sign In or Register to comment.