This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
button [2020/11/30 17:31] – justin | button [2020/12/01 10:03] – justin | ||
---|---|---|---|
Line 1: | Line 1: | ||
======Button====== | ======Button====== | ||
---- | ---- | ||
+ | |||
+ | A **button** is a clickable [[widget]] element that can be configured to run a [[script]], close the parent [[widget]], craft a new [[item]] into a [[item_storage_slot|storage slot]] using any populated [[crafting_input_slot|input slots]], or craft a specific [[item]] using the player' | ||
=====Element Properties===== | =====Element Properties===== | ||
^Icon^Property^Description^ | ^Icon^Property^Description^ | ||
+ | |{{: | ||
|{{: | |{{: | ||
|{{: | |{{: | ||
|{{: | |{{: | ||
- | |{{: | + | |{{: |
- | |{{: | + | |{{: |
- | |{{: | + | |{{: |
- | |{{: | + | |{{: |
- | |{{: | + | |{{: |
- | |{{: | + | |{{: |
+ | |||
+ | =====Scripting===== | ||
+ | You can access and change certain properties of a button from within a [[script]] by simply referencing the parent [[widget]] by its ID followed by a reference to the button element by its ID. See below for examples of changing the text, [[image]], and [[script]] of a button. In these cases, the [[widget]] has an ID of " | ||
+ | |||
+ | Changing a button' | ||
+ | <code bauxite> | ||
+ | widget[" | ||
+ | </ | ||
+ | |||
+ | Changing a button' | ||
+ | <code bauxite> | ||
+ | widget[" | ||
+ | </ | ||
+ | |||
+ | Changing a button' | ||
+ | <code bauxite> | ||
+ | widget[" | ||
+ | </ | ||
~~NOTOC~~ | ~~NOTOC~~ |