Component:ValueRadio: Difference between revisions

From Resonite Wiki
No edit summary
Automated: update Fields, Categories
Line 15: Line 15:
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|CheckVisual|Bool| The boolean that is driven to true whenever the <code>TargetValue</code> is equal to the <code>OptionValue</code>
|CheckVisual|{{RootFieldType|FieldDrive`1|[[Type:Bool|Bool]]}}|TypeAdv0=true| The boolean that is driven to true whenever the <code>TargetValue</code> is equal to the <code>OptionValue</code>
|OptionValue|T| What to set the <code>TargetValue</code> to when the button is pressed.
|OptionValue|'''T'''|TypeAdv1=true| What to set the <code>TargetValue</code> to when the button is pressed.
|TargetValue|IField`1|TypeString2=IField<T>| The value to set when the button is pressed.
|TargetValue|{{RootFieldType|RelayRef`1|[[Type:IField`1|IField`1]]&lt;T&gt;}}|TypeAdv2=true| The value to set when the button is pressed.
}}
}}


Line 34: Line 34:
</translate>
</translate>
[[Category:Generics{{#translation:}}]]
[[Category:Generics{{#translation:}}]]
[[Category:Components{{#translation:}}|ValueRadio`1 (Component){{#translation:}}]]
[[Category:Components{{#translation:}}|Value Radio`1]]
[[Category:ComponentStubs]]
[[Category:ComponentStubs]]
[[Category:Components:UIX:Interaction{{#translation:}}|ValueRadio`1 (Component){{#translation:}}]]
[[Category:Generic Components{{#translation:}}|Value Radio`1]]
[[Category:Components:UIX:Interaction{{#translation:}}|Value Radio`1]]

Revision as of 21:39, 3 March 2024


This article or section is a Stub. You can help the Resonite Wiki by expanding it.


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


Intoduction

ValueRadio components can be used to create a radio selector, meaning a set of buttons that are used to set the same value to different options.

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.
CheckVisual field drive of Bool The boolean that is driven to true whenever the TargetValue is equal to the OptionValue
OptionValue T What to set the TargetValue to when the button is pressed.
TargetValue direct RelayRef`1<IField`1<T>> The value to set when the button is pressed.

Usage

To function, the component simply needs to be attached to a slot that also has a button component attached to it. From then on, pressing that button will activate the ValueRadio, making it set its TargetValue to its OptionValue, which then also sets its CheckVisual to true.

Examples

Related Issues

Related Components