This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
widget [2020/12/01 15:44] justin |
widget [2020/12/01 16:58] (current) justin |
||
---|---|---|---|
Line 11: | Line 11: | ||
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 "test", and it contains a [[text field]] with an ID of "0001" and a [[button]] with an ID of "0002". | 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 "test", and it contains a [[text field]] with an ID of "0001" and a [[button]] with an ID of "0002". | ||
- | This script will close the [[widget]] and store the text that was entered into the [[text field]]. | + | 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. |
<code bauxite> | <code bauxite> | ||
hide_widget("test"); | hide_widget("test"); |