Component:FieldEditor: Difference between revisions

From Resonite Wiki
Automated: create new component page
 
update
 
(4 intermediate revisions by 2 users not shown)
Line 3: Line 3:
|Name=Field Editor
|Name=Field Editor
}}
}}
{{stub}}
A '''FieldEditor''' component takes an IField of any type and deconstructs it's elements into a list of editor components.


== Usage ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|_targetField|IField|
|_targetField|IField| The field to generate an editor list for.
|_textEditors|{{RootFieldType|SyncRefList`1|[[Component:TextEditor|TextEditor]]}}|TypeAdv1=true|
|_textEditors|{{RootFieldType|SyncRefList`1|[[Component:TextEditor|TextEditor]]}}|TypeAdv1=true| A list of text editors of the specified <code>_targetField</code>'s components.
|_textDrives|{{RootFieldType|SyncList`1|[[Type:FieldDrive`1|FieldDrive`1]]&lt;[[Type:String|String]]&gt;}}|TypeAdv2=true|
|_textDrives|{{RootFieldType|SyncList`1|[[Type:FieldDrive`1|FieldDrive`1]]&lt;[[Type:String|String]]&gt;}}|TypeAdv2=true| A list of text value fields to drive with the contents of the components of the specified <code>_targetField</code>.
}}
 
== Sync Delegates ==
{{Table ComponentTriggers
|EditingStarted:[[Type:Action`1|Action`1]]&lt;[[Component:TextEditor|TextEditor]]&gt;|[[Type:Action`1|Action`1]]&lt;[[Component:TextEditor|TextEditor]]&gt;|true| Called when editing starts, used with a [[Component:TextEditor|TextEditor]].
|EditingChanged:[[Type:Action`1|Action`1]]&lt;[[Component:TextEditor|TextEditor]]&gt;|[[Type:Action`1|Action`1]]&lt;[[Component:TextEditor|TextEditor]]&gt;|true| Called when editing value changes, used with a [[Component:TextEditor|TextEditor]].
|EditingFinished:[[Type:Action`1|Action`1]]&lt;[[Component:TextEditor|TextEditor]]&gt;|[[Type:Action`1|Action`1]]&lt;[[Component:TextEditor|TextEditor]]&gt;|true| Called when editing finishes, used with a [[Component:TextEditor|TextEditor]].
}}
}}


== Behavior ==
== Usage ==
Attach to a slot under a [[Component:Canvas|UIX Canvas]] hiearchy with a [[Component:RectTransform|RectTransform]] and then insert an [[Type:IField|IField]] into <code>_targetField</code> to be edited for this component to generate an editor for the elements of the specified <code>_targetField</code>.


== Examples ==
== Examples ==
An [[Type:IField|IField]]&lt;[[Type:Float3|Float3]]&gt; will make the field editor create a list with the X y and z components of the float3 field.


== See Also ==
== See Also ==
* [[Ref Hacking]]


[[Category:Components:Uncategorized{{#translation:}}|Field Editor]]
[[Category:Components:Uncategorized{{#translation:}}|Field Editor]]
[[Category:Components{{#translation:}}|Field Editor]]
[[Category:Components{{#translation:}}|Field Editor]]
[[Category:ComponentStubs]]

Latest revision as of 20:38, 19 March 2025

Component image 
Field Editor component as seen in the Scene Inspector

A FieldEditor component takes an IField of any type and deconstructs it's elements into a list of editor components.

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. Some components stop their functionality when this field is disabled, but some don't.
_targetField IField The field to generate an editor list for.
_textEditors list of TextEditor A list of text editors of the specified _targetField's components.
_textDrives list of FieldDrive`1<String> A list of text value fields to drive with the contents of the components of the specified _targetField.

Sync Delegates

Triggers
Method Name Method type and Arguments. Is the method hidden? Description
EditingStarted:Action`1<TextEditor> Action`1<TextEditor> Called when editing starts, used with a TextEditor.
EditingChanged:Action`1<TextEditor> Action`1<TextEditor> Called when editing value changes, used with a TextEditor.
EditingFinished:Action`1<TextEditor> Action`1<TextEditor> Called when editing finishes, used with a TextEditor.

Usage

Attach to a slot under a UIX Canvas hiearchy with a RectTransform and then insert an IField into _targetField to be edited for this component to generate an editor for the elements of the specified _targetField.

Examples

An IField<Float3> will make the field editor create a list with the X y and z components of the float3 field.

See Also