Component:ButtonReferenceSet: Difference between revisions

From Resonite Wiki
Automated: update Categories
This is no longer a stub. Updated the description, added a usage description, added field descriptions.
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=ButtonReferenceSet`1Component.png
|Image=ButtonReferenceSet`1Component.png
|Name=Button Reference Set`1
|Name=Button Reference Set`1
}}
}}
The '''ButtonReferenceSet''' component takes in a [[Reference Type]] and a <code>TargetReference</code>. When an [[Type:IButton|IButton]] is pressed while this component is on the same [[Slot|slot]], this will send the reference to the provided <code>TargetReference</code>.


<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|TargetReference|'''[[Type:SyncRef`1|SyncRef`1]]&lt;T&gt;'''|TypeAdv0=true|
|TargetReference|'''[[Type:SyncRef`1|SyncRef`1]]&lt;T&gt;'''|TypeAdv0=true| The target to send the reference outwards.
|SetReference|'''T'''|TypeAdv1=true|
|SetReference|'''T'''|TypeAdv1=true| The reference to set when the button is pressed.
}}
}}


<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
This is similar to the [[ProtoFlux:Write|Write]] [[ProtoFlux]] node but as a component instead.


<!--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 Set`1]]
[[Category:Components{{#translation:}}|Button Reference Set`1]]
[[Category:Generic Components{{#translation:}}|Button Reference Set`1]]
[[Category:Generic Components{{#translation:}}|Button Reference Set`1]]
[[Category:Components:Common UI:Button Interactions{{#translation:}}|Button Reference Set`1]]
[[Category:Components:Common UI:Button Interactions{{#translation:}}|Button Reference Set`1]]

Latest revision as of 23:14, 11 September 2024

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


The ButtonReferenceSet component takes in a Reference Type and a TargetReference. When an IButton is pressed while this component is on the same slot, this will send the reference to the provided 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 target to send the reference outwards.
SetReference T The reference to set when the button is pressed.

Usage

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

Examples

Related Components