Documentation
¶
Overview ¶
By setting various properties on this object, you can control how individual characters will be displayed in a RichTextEffect.
Index ¶
- type Advanced
- type Any
- type Extension
- type ID
- type Instance
- func (self Instance) AsCharFXTransform() Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsRefCounted() [1]gd.RefCounted
- func (self Instance) Color() Color.RGBA
- func (self Instance) ElapsedTime() Float.X
- func (self Instance) Env() map[any]any
- func (self Instance) Font() RID.Font
- func (self Instance) GlyphCount() int
- func (self Instance) GlyphFlags() int
- func (self Instance) GlyphIndex() int
- func (self Instance) ID() ID
- func (self Instance) Offset() Vector2.XY
- func (self Instance) Outline() bool
- func (self Instance) Range() Vector2i.XY
- func (self Instance) RelativeIndex() int
- func (self Instance) SetColor(value Color.RGBA)
- func (self Instance) SetElapsedTime(value Float.X)
- func (self Instance) SetEnv(value map[any]any)
- func (self Instance) SetFont(value RID.Font)
- func (self Instance) SetGlyphCount(value int)
- func (self Instance) SetGlyphFlags(value int)
- func (self Instance) SetGlyphIndex(value int)
- func (self *Instance) SetObject(obj [1]gd.Object) bool
- func (self Instance) SetOffset(value Vector2.XY)
- func (self Instance) SetOutline(value bool)
- func (self Instance) SetRange(value Vector2i.XY)
- func (self Instance) SetRelativeIndex(value int)
- func (self Instance) SetTransform(value Transform2D.OriginXY)
- func (self Instance) SetVisible(value bool)
- func (self Instance) Transform() Transform2D.OriginXY
- func (self Instance) Virtual(name string) reflect.Value
- func (self Instance) Visible() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type Extension ¶
Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension
func (*Extension[T]) AsCharFXTransform ¶
func (*Extension[T]) AsRefCounted ¶
func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted
type ID ¶
ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.
type Instance ¶
type Instance [1]gdclass.CharFXTransform
Instance of the class with convieniently typed arguments and results.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsCharFXTransform ¶
func (Instance) AsRefCounted ¶
func (self Instance) AsRefCounted() [1]gd.RefCounted
func (Instance) ElapsedTime ¶
The time elapsed since the RichTextLabel was added to the scene tree (in seconds). Time stops when the RichTextLabel is paused (see Node.ProcessMode). Resets when the text in the RichTextLabel is changed.
Note: Time still passes while the RichTextLabel is hidden.
func (Instance) 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.X, they will be converted automatically. Color codes in the form #rrggbb or #rgb will be converted to an opaque Color.RGBA. 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 data structure:
func (Instance) 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.
func (Instance) GlyphCount ¶
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.
func (Instance) GlyphFlags ¶
Glyph flags. See [TextServer.GraphemeFlag] for more info.
Note: Read-only. Setting this property won't affect drawing.
func (Instance) GlyphIndex ¶
Glyph index specific to the Font. If you want to replace this glyph, use TextServer.FontGetGlyphIndex with Font to get a new glyph index for a single character.
func (Instance) Outline ¶
If true, FX transform is called for outline drawing.
Note: Read-only. Setting this property won't affect drawing.
func (Instance) Range ¶
Absolute character range in the string, corresponding to the glyph.
Note: Read-only. Setting this property won't affect drawing.
func (Instance) RelativeIndex ¶
The character offset of the glyph, relative to the current RichTextEffect custom block.
Note: Read-only. Setting this property won't affect drawing.
func (Instance) SetElapsedTime ¶
SetElapsedTime sets the property returned by [GetElapsedTime].
func (Instance) SetGlyphCount ¶
SetGlyphCount sets the property returned by [GetGlyphCount].
func (Instance) SetGlyphFlags ¶
SetGlyphFlags sets the property returned by [GetGlyphFlags].
func (Instance) SetGlyphIndex ¶
SetGlyphIndex sets the property returned by [GetGlyphIndex].
func (Instance) SetOutline ¶
SetOutline sets the property returned by [IsOutline].
func (Instance) SetRelativeIndex ¶
SetRelativeIndex sets the property returned by [GetRelativeIndex].
func (Instance) SetTransform ¶
func (self Instance) SetTransform(value Transform2D.OriginXY)
SetTransform sets the property returned by [GetTransform].
func (Instance) SetVisible ¶
SetVisible sets the property returned by [IsVisible].
func (Instance) Transform ¶
func (self Instance) Transform() Transform2D.OriginXY
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.