You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[[some section]]:
textbox({
placeholder: 'Enter your name',
attribute: 'name',
enter: 'next section'
});
Type your name in the box below.
[[next section]]:
Your name is {name}.
The textbox function (alias of squiffy.textbox) adds a text input to the end of the section. When the player types something and presses enter, the attribute is set and play is moved to the specified section.
We'll want the textbox at the end of the section - currently JS runs before the section is rendered. We should simply add a mechanism to specify a function to run after rendering. Will need to support multiple functions being added.
The text was updated successfully, but these errors were encountered:
It would be nice that whatever mechanism you develop it would be flexible enough to allow any JS the option to run before or after; regardless if textbox or other. Someone may want to kick off some JS to act upon the input of the text field for example:
"Input the secret code", a JS function returns something based on the code input.
In my case, I already have the need to run JS, render, and run JS.
Idea for a JS API to get input from a textbox.
The
textbox
function (alias ofsquiffy.textbox
) adds a text input to the end of the section. When the player types something and presses enter, the attribute is set and play is moved to the specified section.We'll want the textbox at the end of the section - currently JS runs before the section is rendered. We should simply add a mechanism to specify a function to run after rendering. Will need to support multiple functions being added.
The text was updated successfully, but these errors were encountered: