Component:BooleanValueDriver: Difference between revisions

From Resonite Wiki
Automated: update Fields, Categories
m Yosh moved page Component:BooleanValueDriver`1 to Component:BooleanValueDriver: component names shouldn't have `1
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<languages></languages>
<languages></languages>
<translate>
<translate>
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=BooleanValueDriver`1Component.png
|Image=BooleanValueDriver`1Component.png
|Name=BooleanValueDriver`1
|Name=BooleanValueDriver`1
}}
}}
== Intoduction ==
The '''BooleanValueDriver''' component drives the [[Field]] in <code>TargetField</code> to the value specified in <code>TrueValue</code> or <code>FalseValue</code> based on <code>State</code>.
Drives the [[Field]] in <code>TargetField</code> to the value specified in <code>TrueValue</code> or <code>FalseValue</code> based on <code>State</code>


<code>TargetField</code> is generic, and is assigned a type when created in the [[Component Attacher]]
== Fields ==
== Usage ==
{{Table ComponentFields
{{Table ComponentFields
|State|Bool| The state of this component. Chooses which Value to use when driving <code>TargetField</code>
|State|Bool| The state of this component. Chooses which value to use when driving <code>TargetField</code>
|TargetField|{{RootFieldType|FieldDrive`1|T}}|TypeAdv1=true| The [[Field]] to drive
|TargetField|{{RootFieldType|FieldDrive`1|T}}|TypeAdv1=true| The [[Field]] to drive
|FalseValue|'''T'''|TypeAdv2=true| The value that is used to drive <code>TargetField</code> when <code>State</code> is false.
|FalseValue|'''T'''|TypeAdv2=true| The value that is used to drive <code>TargetField</code> when <code>State</code> is false.
|TrueValue|'''T'''|TypeAdv3=true| The value that is used to drive <code>TargetField</code> when <code>State</code> is true.
|TrueValue|'''T'''|TypeAdv3=true| The value that is used to drive <code>TargetField</code> when <code>State</code> is true.
}}
}}
== Behavior ==
 
== Usage ==
<code>TargetField</code> is the field to drive, and has the same type as specified during component creation. When <code>State</code> is false, the field pointed to by <code>TargetField</code> will take the value of <code>FalseValue</code>. When it is true, the field will take the value of <code>TrueValue</code>.
 
== Examples ==
== Examples ==
== Related Components ==
 
== See Also ==
* [[ProtoFlux:Conditional]]
</translate>
</translate>
[[Category:Generics{{#translation:}}]]
[[Category:Generics{{#translation:}}]]

Latest revision as of 17:36, 8 November 2024

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

The BooleanValueDriver component drives the Field in TargetField to the value specified in TrueValue or FalseValue based on State.

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.
State Bool The state of this component. Chooses which value to use when driving TargetField
TargetField field drive of T The Field to drive
FalseValue T The value that is used to drive TargetField when State is false.
TrueValue T The value that is used to drive TargetField when State is true.

Usage

TargetField is the field to drive, and has the same type as specified during component creation. When State is false, the field pointed to by TargetField will take the value of FalseValue. When it is true, the field will take the value of TrueValue.

Examples

See Also