Component:TextEditor: Difference between revisions

From Resonite Wiki
This is no longer a stub. added a description, added field description, added a usage description.
Automated: update Fields
 
Line 15: Line 15:
|Undo|Bool| If true, the setting of the text is undoable.
|Undo|Bool| If true, the setting of the text is undoable.
|UndoDescription|String| This gets shown on the undo button on the [[Context menu]].
|UndoDescription|String| This gets shown on the undo button on the [[Context menu]].
|FinishHandling|'''[[#FinishAction|FinishAction]]'''|TypeAdv3=true| Lets the Text editor know what to do when the user leaves a text input.
|FinishHandling|'''[[#FinishAction|TextEditor.FinishAction]]'''|TypeAdv3=true| 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).
|AutoCaretColorField|Bool| Automatically sets the color of the caret (based on text color).
|CaretColorField|ColorX| Sets the caret color.
|CaretColorField|ColorX| Sets the caret color.

Latest revision as of 06:05, 17 March 2025

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. Some components stop their functionality when this field is disabled, but some don't.
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 TextEditor.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 delegate of identity Action`1<TextEditor> Gives the TextEditor an action when the editing has started.
EditingChanged delegate of identity Action`1<TextEditor> Gives the TextEditor an action when the editing has changed.
EditingFinished delegate of identity Action`1<TextEditor> Gives the TextEditor an action when the editing has finished.
SubmitPressed delegate of identity 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