m ProbablePrime moved page ButtonToggle (Component) to Component:ButtonToggle: Creating component Namespace |
Automated: update component fields |
||
Line 13: | Line 13: | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|TargetValue|IField`1| | |TargetValue|'''[[Type:IField`1|IField`1]]<[[Type:Bool|Bool]]>'''|TypeAdv0=true| The boolean to invert whenever the button is pressed. | ||
}} | }} | ||
Revision as of 10:39, 1 March 2024
This article or section is a Stub. You can help the Resonite Wiki by expanding it.
Component image
The ButtonValueToggle component can be used to make a button that switches a boolean value between true and false every time the button is pressed.
Fields
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. |
TargetValue
|
IField`1<Bool> | The boolean to invert whenever the button is pressed. |
Usage
To function, the component simply needs to be attached to a slot that also has a button component attached to it. From then on, pressing that button will activate the ButtonToggle, making it toggle its TargetValue
from true to false or the other way round.