Difference between revisions of "ButtonToggle (Component)"
Jump to navigation
Jump to search
Mysticporo (talk | contribs) (Created page with "<languages></languages> <translate> <!--T:1--> {{stub}} {{Infobox Component |Image=ButtonToggleComponent.png |Name=Button Toggle }} <!--T:2--> == Fields == {{Table ComponentF...") |
(Wrote article.) |
||
Line 7: | Line 7: | ||
|Name=Button Toggle | |Name=Button Toggle | ||
}} | }} | ||
+ | |||
+ | 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. | ||
<!--T:2--> | <!--T:2--> | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
− | |TargetValue|IField`1|TypeString0=IField<bool>| | + | |TargetValue|IField`1|TypeString0=IField<bool>| The boolean to invert whenever the button is pressed. |
}} | }} | ||
<!--T:3--> | <!--T:3--> | ||
== Usage == | == 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 <code>TargetValue</code> from true to false or the other way round. | ||
<!--T:4--> | <!--T:4--> |
Latest revision as of 11:17, 27 December 2021
This article or section is a Stub. You can help the Neos Wiki by expanding it.
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
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<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.