Component:ButtonValueCycle: Difference between revisions

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


== Usage ==
The '''ButtonValueCycle''' component holds a list of [[Value Types|values]] and takes in a <code>TargetValue</code> of a provided type. When an [[Type:IButton|IButton]] is pressed while this component is on it, this will cycle through the listed values and send the data through the <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 value data to send outwards.
|Values|{{RootFieldType|SyncFieldList`1|T}}|TypeAdv1=true|
|Values|{{RootFieldType|SyncFieldList`1|T}}|TypeAdv1=true| The list of values to cycle through.
}}
}}


== Behavior ==
== Usage ==
Useful for needing a way to cycle through values of any type.


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

Latest revision as of 23:05, 11 September 2024

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


The ButtonValueCycle component holds a list of values and takes in a TargetValue of a provided type. When an IButton is pressed while this component is on it, this will cycle through the listed values and send the data through the 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 value data to send outwards.
Values direct SyncFieldList`1<T> The list of values to cycle through.

Usage

Useful for needing a way to cycle through values of any type.

Examples

See Also