Component:TextEditor: Difference between revisions

From Resonite Wiki
imported>Mysticporo
Created page with "<languages></languages> <translate> <!--T:1--> {{stub}} {{Infobox Component |Image=TextEditorComponent.png |Name=Text Editor }} <!--T:2--> == Fields == {{Table ComponentField..."
 
This is no longer a stub. added a description, added field description, added a usage description.
 
(3 intermediate revisions by 2 users not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=TextEditorComponent.png
|Image=TextEditorComponent.png
|Name=Text Editor
|Name=Text Editor
}}
}}
The '''TextEditor''' component takes in a reference to a [[Component:Text|Text]] or [[Component:TextRenderer|TextRenderer]], and then outputs the result into that reference along with the parameters given and by what actions it should do so.


<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Text|IText|
|Text|IText| The output of where the text is going to be placed at.
|Undo|Bool|
|Undo|Bool| If true, the setting of the text is undoable.
|UndoDescription|String|
|UndoDescription|String| This gets shown on the undo button on the [[Context menu]].
|FinishHandling|FinishAction|
|FinishHandling|'''[[#FinishAction|FinishAction]]'''|TypeAdv3=true| Lets the Text editor know what to do when the user leaves a text input.
|AutoCaretColorField|Bool|
|AutoCaretColorField|Bool| Automatically sets the color of the caret (based on text color).
|CaretColorField|Color|
|CaretColorField|ColorX| Sets the caret color.
|SelectionColorField|Color|
|SelectionColorField|ColorX| Sets the selection color for this caret.
|EditingStarted|WorldDelegate|
|EditingStarted|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]&lt;[[Component:TextEditor|TextEditor]]&gt;}}|TypeAdv7=true| Gives the TextEditor an action when the editing has started.
|EditingChanged|WorldDelegate|
|EditingChanged|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]&lt;[[Component:TextEditor|TextEditor]]&gt;}}|TypeAdv8=true| Gives the TextEditor an action when the editing has changed.
|EditingFinished|WorldDelegate|
|EditingFinished|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]&lt;[[Component:TextEditor|TextEditor]]&gt;}}|TypeAdv9=true| Gives the TextEditor an action when the editing has finished.
|SubmitPressed|WorldDelegate|
|SubmitPressed|{{RootFieldType|SyncDelegate`1|[[Type:Action`1|Action`1]]&lt;[[Component:TextEditor|TextEditor]]&gt;}}|TypeAdv10=true| Gives the TextEditor an action when the editing has been submitted.
}}
}}


<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
This component is used in many places, including:
* [[Component:PrimitiveMemberEditor|Primitive Member Editor]] for directly editing [[Component:TextField|TextFields]] (and [[Ref Hacking]])
* [[UIX]] and [[Component:TextField|TextFields]]
* [[Component:FloatTextEditorParser|Parsing floats]] and [[Component:FloatTextEditorParser|parsing ints]]


<!--T:4-->
<!--T:4-->
Line 33: Line 38:
== Related Components ==
== Related Components ==
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Components{{#translation:}}|Text Editor]]
[[Category:Components{{#translation:}}|Text Editor]]
[[Category:Components With Nested Enums{{#translation:}}|Text Editor]]
[[Category:Components:Common UI:Editors{{#translation:}}|Text Editor]]
[[Category:Components:Common UI:Editors{{#translation:}}|Text Editor]]

Latest revision as of 23:16, 12 September 2024

Component image 
Text Editor component as seen in the Scene Inspector


The TextEditor component takes in a reference to a Text or TextRenderer, and then outputs the result into that reference along with the parameters given and by what actions it should do so.

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.
Text IText The output of where the text is going to be placed at.
Undo Bool If true, the setting of the text is undoable.
UndoDescription String This gets shown on the undo button on the Context menu.
FinishHandling FinishAction Lets the Text editor know what to do when the user leaves a text input.
AutoCaretColorField Bool Automatically sets the color of the caret (based on text color).
CaretColorField ColorX Sets the caret color.
SelectionColorField ColorX Sets the selection color for this caret.
EditingStarted Action`1<TextEditor> Gives the TextEditor an action when the editing has started.
EditingChanged Action`1<TextEditor> Gives the TextEditor an action when the editing has changed.
EditingFinished Action`1<TextEditor> Gives the TextEditor an action when the editing has finished.
SubmitPressed Action`1<TextEditor> Gives the TextEditor an action when the editing has been submitted.

Usage

This component is used in many places, including:

Examples

Related Components