Twine Version: 2.10
Sugarcube 2.37
Hello , I want to ask another stupid question…
What is <<widget>>
? And how to use it? In what type of case to use it? Can you gave me sample of usage?
I read some forum & motoslave website, and general knowledge
I only knew widget is a macro, and it has args that has depreceated…
Registers the passage as
<<widget>>
macro definitions, which are loaded during startup
The special$args
story variable has been deprecated in favor of the_args_
temporary variable.
"Widgets are macros.
Widgets are written and defined in twine script, while other “standard” macros are written in JavaScript. The widget macro automates the process of creating a macro, but limits your ability to use certain features; for example if you want to create a macro that has child tags, like
<<if>>
and<<else>>
, you’re usually better off just making a macro in JavaScript."
sugarcube 2: What is the difference between widgets and macros? - Twine Forum
I read these, and someone else code that use <<widget>>
but I still don’t understand, what it means, why they use it and what is <<widget>>
used for…
When I search what is sugarcube widget, what is widget, it seems everyone already knew what its usage and context of it, is there a resource explaining what it means / definition? (Beside motoslave, i feel like elementary school reading university book)