Component:TextGizmo: Difference between revisions

From Resonite Wiki
Automated: update SyncDelegates
add info
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
|Name=Text Gizmo
|Name=Text Gizmo
}}
}}
{{stub}}
The '''TextGizmo''' component is commonly found on newly spawned text elements and is used to quickly edit the text of a spawned text element. This component and it's visuals delete themselves after the user selects the text element using a development tip or inspector.


== Usage ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|_target|{{RootFieldType|RelayRef`1|[[Component:TextRenderer|TextRenderer]]}}|TypeAdv0=true|
|_target|{{RootFieldType|RelayRef`1|[[Component:TextRenderer|TextRenderer]]}}|TypeAdv0=true| The text renderer to edit the text of.
|_editor|'''[[Component:TextEditor|TextEditor]]'''|TypeAdv1=true|
|_editor|'''[[Component:TextEditor|TextEditor]]'''|TypeAdv1=true| The text editor Component that targets <code>_target</code> for its editing.
|_editIconPosition|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv2=true|
|_editIconPosition|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv2=true| The position field of the start editing icon.
|_editIconScale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv3=true|
|_editIconScale|{{RootFieldType|FieldDrive`1|[[Type:Float3|Float3]]}}|TypeAdv3=true| The scale field of the start editing icon.
}}
}}


== Sync Delegates ==
== Sync Delegates ==
{{Table ComponentTriggers
{{Table ComponentTriggers
|EditTouched[[Type:TouchEvent|TouchEvent]]|[[Type:TouchEvent|TouchEvent]]|true|
|EditTouched:[[Type:TouchEvent|TouchEvent]]|[[Type:TouchEvent|TouchEvent]]|true| Is called when the user wants to start editing <code>_target</code> via using this gizmo.
}}
}}


== Behavior ==
== Usage ==


== Examples ==
== Examples ==
Is commonly found on Basic and Outline text elements created through the create new menu brought up via the dev tip.


== See Also ==
== See Also ==
Line 26: Line 27:
[[Category:Components:Uncategorized{{#translation:}}|Text Gizmo]]
[[Category:Components:Uncategorized{{#translation:}}|Text Gizmo]]
[[Category:Components{{#translation:}}|Text Gizmo]]
[[Category:Components{{#translation:}}|Text Gizmo]]
[[Category:ComponentStubs]]

Latest revision as of 15:10, 30 April 2025

Component image 
File:TextGizmoComponent.png
Text Gizmo component as seen in the Scene Inspector

The TextGizmo component is commonly found on newly spawned text elements and is used to quickly edit the text of a spawned text element. This component and it's visuals delete themselves after the user selects the text element using a development tip or inspector.

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.
_target direct RelayRef`1<TextRenderer> The text renderer to edit the text of.
_editor TextEditor The text editor Component that targets _target for its editing.
_editIconPosition field drive of Float3 The position field of the start editing icon.
_editIconScale field drive of Float3 The scale field of the start editing icon.

Sync Delegates

Triggers
Method Name Method type and Arguments. Is the method hidden? Description
EditTouched:TouchEvent TouchEvent Is called when the user wants to start editing _target via using this gizmo.

Usage

Examples

Is commonly found on Basic and Outline text elements created through the create new menu brought up via the dev tip.

See Also