Component:ValueRadio

From Resonite Wiki
(Redirected from Component:ValueRadio`1)
This page contains changes which are not marked for translation.
Component image 
ValueRadio`1 component as seen in the Scene Inspector


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

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.

  • 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 Issues

Related Components