Component:ButtonValueSet: Difference between revisions

From Resonite Wiki
Automated: create new component page
 
This is no longer a stub. Added a description, added a usage description, added field descriptions.
 
Line 3: Line 3:
|Name=Button Value Set`1
|Name=Button Value Set`1
}}
}}
{{stub}}


== Usage ==
The '''ButtonValueSet''' component takes in a [[Value Type]] and a <code>TargetValue</code>. When an [[Type:IButton|IButton]] is pressed while this component is on the same [[Slot|slot]], this will send the value to the provided <code>TargetValue</code>.
 
{{Table ComponentFields
{{Table ComponentFields
|TargetValue|'''[[Type:IField`1|IField`1]]&lt;T&gt;'''|TypeAdv0=true|
|TargetValue|'''[[Type:IField`1|IField`1]]&lt;T&gt;'''|TypeAdv0=true| The target to send the value outwards.
|SetValue|'''T'''|TypeAdv1=true|
|SetValue|'''T'''|TypeAdv1=true| The value to set when the button is pressed.
}}
}}


== Behavior ==
== Usage ==
This is similar to the [[ProtoFlux:Write|Write]] [[ProtoFlux]] node but as a component instead.


== Examples ==
== Examples ==
Line 20: Line 21:
[[Category:Components{{#translation:}}|Button Value Set`1]]
[[Category:Components{{#translation:}}|Button Value Set`1]]
[[Category:Generic Components{{#translation:}}|Button Value Set`1]]
[[Category:Generic Components{{#translation:}}|Button Value Set`1]]
[[Category:ComponentStubs]]

Latest revision as of 23:27, 11 September 2024

Component image 
Button Value Set`1 component as seen in the Scene Inspector


The ButtonValueSet component takes in a Value Type and a TargetValue. When an IButton is pressed while this component is on the same slot, this will send the value to the provided TargetValue.

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<T> The target to send the value outwards.
SetValue T The value to set when the button is pressed.

Usage

This is similar to the Write ProtoFlux node but as a component instead.

Examples

See Also