Component:ButtonReferenceCycle: Difference between revisions

From Resonite Wiki
m ProbablePrime moved page ButtonReferenceCycle (Component) to Component:ButtonReferenceCycle: Creating component Namespace
Added a description, added field descriptions, added usage description. This is no longer a stub.
 
(2 intermediate revisions by one other user not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=ButtonReferenceCycle`1Component.png
|Image=ButtonReferenceCycle`1Component.png
|Name=Button Reference Cycle`1
|Name=Button Reference Cycle`1
}}
}}
The '''ButtonReferenceCycle''' component holds a list of [[Reference Types|references]] and takes in a <code>TargetReference</code> of a provided type. When an [[Type:IButton|IButton]] is pressed while this component is on it, this will cycle through the listed references and send the data through the <code>TargetReference</code>.


<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|TargetReference|SyncRef`1|TypeString0=SyncRef<IWorldElement>|
|TargetReference|'''[[Type:SyncRef`1|SyncRef`1]]&lt;T&gt;'''|TypeAdv0=true| The reference data to send outwards.
|Targets|SyncRefList`1|TypeString1=SyncRefList<IWorldElement>|
|Targets|{{RootFieldType|SyncRefList`1|T}}|TypeAdv1=true| The list of references to cycle through.
}}
}}


<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
Useful for needing a way to cycle through references of any type.


<!--T:4-->
<!--T:4-->
Line 24: Line 26:
== Related Components ==
== Related Components ==
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Generics{{#translation:}}]]
[[Category:Generics{{#translation:}}]]
[[Category:Components{{#translation:}}|Button Reference Cycle`1]]
[[Category:Components{{#translation:}}|Button Reference Cycle`1]]
[[Category:Generic Components{{#translation:}}|Button Reference Cycle`1]]
[[Category:Components:Common UI:Button Interactions{{#translation:}}|Button Reference Cycle`1]]
[[Category:Components:Common UI:Button Interactions{{#translation:}}|Button Reference Cycle`1]]

Latest revision as of 22:58, 11 September 2024

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


The ButtonReferenceCycle component holds a list of references and takes in a TargetReference of a provided type. When an IButton is pressed while this component is on it, this will cycle through the listed references and send the data through the TargetReference.

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.
TargetReference SyncRef`1<T> The reference data to send outwards.
Targets list of T The list of references to cycle through.

Usage

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

Examples

Related Components