Component:ReferenceRadio: Difference between revisions

From Resonite Wiki
 
Added descriptions. Added field descriptions. Added usage information.
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=ReferenceRadio`1Component.png
|Image=ReferenceRadio`1Component.png
Line 9: Line 8:


<!--T:2-->
<!--T:2-->
== Intoduction ==
The '''ReferenceRadio''' component is a listener component that activates or deactivates slots using the <code>CheckVisual</code> field, based if a <code>TargetReference</code> matches the <code>OptionReference</code> field. When a match is found, the <code>CheckVisual</code> field will be set to true.


<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
{{Table ComponentFields
{{Table ComponentFields
|CheckVisual|Bool|  
|CheckVisual|{{RootFieldType|FieldDrive`1|[[Type:Bool|Bool]]}}|TypeAdv0=true|The bool that will be set true when there is a match.
|OptionReference|Sync`1|TypeString1=Sync<T>|  
|OptionReference|'''T'''|TypeAdv1=true|The reference we are checking a match for, when found, it will trigger this option.
|TargetReference|SyncRef`1|TypeString2=SyncRef<Sync<T>>|  
|TargetReference|{{RootFieldType|RelayRef`1|[[Type:SyncRef`1|SyncRef`1]]&lt;T&gt;}}|TypeAdv2=true|The thing we are using to check.
}}
}}


<!--T:4-->
<!--T:4-->
== Behavior ==
== Usage ==
* This is useful for making forms that need one answer from many choices, a set of button that should only have one being active, and anything that requires only one activation from many things.
* the <code>CheckVisual</code> field does not just have to be the active of a slot, this can be any [[Type:IField|IField]] [[Type:bool|bool]], allowing users to be creative with how they want to structure their component's logic.


<!--T:5-->
<!--T:5-->
Line 29: Line 30:
</translate>
</translate>
[[Category:Generics{{#translation:}}]]
[[Category:Generics{{#translation:}}]]
[[Category:Components{{#translation:}}|ReferenceRadio`1 (Component){{#translation:}}]]
[[Category:Components{{#translation:}}|Reference Radio`1]]
[[Category:ComponentStubs]]
[[Category:Generic Components{{#translation:}}|Reference Radio`1]]
[[Category:Components:UIX:Interaction{{#translation:}}|ReferenceRadio`1 (Component){{#translation:}}]]
[[Category:Components:UIX:Interaction{{#translation:}}|Reference Radio`1]]

Latest revision as of 00:54, 28 July 2024

Component image 
ReferenceRadio`1 component as seen in the Scene Inspector


The ReferenceRadio component is a listener component that activates or deactivates slots using the CheckVisual field, based if a TargetReference matches the OptionReference field. When a match is found, the CheckVisual field will be set to true.

Usage

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.
CheckVisual field drive of Bool The bool that will be set true when there is a match.
OptionReference T The reference we are checking a match for, when found, it will trigger this option.
TargetReference direct RelayRef`1<SyncRef`1<T>> The thing we are using to check.

Usage

  • This is useful for making forms that need one answer from many choices, a set of button that should only have one being active, and anything that requires only one activation from many things.
  • the CheckVisual field does not just have to be the active of a slot, this can be any IField bool, allowing users to be creative with how they want to structure their component's logic.

Examples

Related Components