Class CharFXTransform
Controls how an individual character will be displayed in a RichTextEffect.
- Inheritance
-
CharFXTransform
Remarks
By setting various properties on this object, you can control how individual characters will be displayed in a RichTextEffect.
See Also
Properties
color
The color the character will be drawn with.
var color : Color = Color(0, 0, 0, 1)
Property Value
Remarks
elapsed_time
The time elapsed since the RichTextLabel was added to the scene tree (in seconds). Time stops when the RichTextLabel is paused (see process_mode). Resets when the text in the RichTextLabel is changed.
Note: Time still passes while the RichTextLabel is hidden.
var elapsed_time : float = 0.0
Property Value
Remarks
env
Contains the arguments passed in the opening BBCode tag. By default, arguments are strings; if their contents match a type such as bool, int or float, they will be converted automatically. Color codes in the form #rrggbb
or #rgb
will be converted to an opaque Color. String arguments may not contain spaces, even if they're quoted. If present, quotes will also be present in the final string.
For example, the opening BBCode tag [example foo=hello bar=true baz=42 color=#ffffff]
will map to the following Dictionary:
{"foo": "hello", "bar": true, "baz": 42, "color": Color(1, 1, 1, 1)}
var env : Dictionary = {}
Property Value
Remarks
- void set_environment(Dictionary value)
- Dictionary get_environment
font
TextServer RID of the font used to render glyph, this value can be used with TextServer.font_*
methods to retrieve font information.
Note: Read-only. Setting this property won't affect drawing.
var font : RID = RID()
Property Value
Remarks
glyph_count
Number of glyphs in the grapheme cluster. This value is set in the first glyph of a cluster.
Note: Read-only. Setting this property won't affect drawing.
var glyph_count : int = 0
Property Value
Remarks
glyph_flags
Glyph flags. See GraphemeFlag for more info.
Note: Read-only. Setting this property won't affect drawing.
var glyph_flags : int = 0
Property Value
Remarks
glyph_index
Glyph index specific to the font. If you want to replace this glyph, use TextServer.font_get_glyph_index with font to get a new glyph index for a single character.
var glyph_index : int = 0
Property Value
Remarks
offset
The position offset the character will be drawn with (in pixels).
var offset : Vector2 = Vector2(0, 0)
Property Value
Remarks
outline
If true
, FX transform is called for outline drawing.
Note: Read-only. Setting this property won't affect drawing.
var outline : bool = false
Property Value
Remarks
range
Absolute character range in the string, corresponding to the glyph.
Note: Read-only. Setting this property won't affect drawing.
var range : Vector2i = Vector2i(0, 0)
Property Value
Remarks
relative_index
The character offset of the glyph, relative to the current RichTextEffect custom block.
Note: Read-only. Setting this property won't affect drawing.
var relative_index : int = 0
Property Value
Remarks
transform
The current transform of the current glyph. It can be overridden (for example, by driving the position and rotation from a curve). You can also alter the existing value to apply transforms on top of other effects.
var transform : Transform2D = Transform2D(1, 0, 0, 1, 0, 0)
Property Value
Remarks
- void set_transform(Transform2D value)
- Transform2D get_transform
visible
If true
, the character will be drawn. If false
, the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their color to Color(1, 1, 1, 0)
instead.
var visible : bool = true