This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
widget [2020/12/01 11:09] – justin | widget [2020/12/01 16:58] – justin | ||
---|---|---|---|
Line 9: | Line 9: | ||
=====Scripting===== | =====Scripting===== | ||
+ | You can access and change certain element properties from within a [[script]] by simply referencing the parent [[widget]] and the child element by their unique IDs. The following example code assumes there is a [[widget]] with an ID of " | ||
- | <code | + | This script will close the [[widget]], store the text that was entered into the [[text field]] into a variable, then display a message to the player using their name. |
+ | < | ||
+ | hide_widget(" | ||
+ | $name = widget[" | ||
+ | display_message(" | ||
+ | </ | ||
- | (WIP - Accessing elements within a widget to change | + | This script will change |
+ | <code bauxite> | ||
+ | widget[" | ||
+ | </ | ||
~~NOTOC~~ | ~~NOTOC~~ |