CharFXTransform

package
v0.0.0-...-fe0704e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2025 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

By setting various properties on this object, you can control how individual characters will be displayed in a RichTextEffect.

Index

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 Any

type Any interface {
	gd.IsClass
	AsCharFXTransform() Instance
}

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

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 (self *Extension[T]) AsCharFXTransform() Instance

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

type ID

type ID Object.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.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

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 New

func New() Instance

func (Instance) AsCharFXTransform

func (self Instance) AsCharFXTransform() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) Color

func (self Instance) Color() Color.RGBA

The color the character will be drawn with.

func (Instance) ElapsedTime

func (self Instance) ElapsedTime() Float.X

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

func (self Instance) Env() map[any]any

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

func (self Instance) Font() RID.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

func (self Instance) GlyphCount() int

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

func (self Instance) GlyphFlags() int

Glyph flags. See [TextServer.GraphemeFlag] for more info.

Note: Read-only. Setting this property won't affect drawing.

func (Instance) GlyphIndex

func (self Instance) GlyphIndex() int

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) ID

func (self Instance) ID() ID

func (Instance) Offset

func (self Instance) Offset() Vector2.XY

The position offset the character will be drawn with (in pixels).

func (Instance) Outline

func (self Instance) Outline() bool

If true, FX transform is called for outline drawing.

Note: Read-only. Setting this property won't affect drawing.

func (Instance) Range

func (self Instance) Range() Vector2i.XY

Absolute character range in the string, corresponding to the glyph.

Note: Read-only. Setting this property won't affect drawing.

func (Instance) RelativeIndex

func (self Instance) RelativeIndex() int

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) SetColor

func (self Instance) SetColor(value Color.RGBA)

SetColor sets the property returned by [GetColor].

func (Instance) SetElapsedTime

func (self Instance) SetElapsedTime(value Float.X)

SetElapsedTime sets the property returned by [GetElapsedTime].

func (Instance) SetEnv

func (self Instance) SetEnv(value map[any]any)

SetEnv sets the property returned by [GetEnvironment].

func (Instance) SetFont

func (self Instance) SetFont(value RID.Font)

SetFont sets the property returned by [GetFont].

func (Instance) SetGlyphCount

func (self Instance) SetGlyphCount(value int)

SetGlyphCount sets the property returned by [GetGlyphCount].

func (Instance) SetGlyphFlags

func (self Instance) SetGlyphFlags(value int)

SetGlyphFlags sets the property returned by [GetGlyphFlags].

func (Instance) SetGlyphIndex

func (self Instance) SetGlyphIndex(value int)

SetGlyphIndex sets the property returned by [GetGlyphIndex].

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetOffset

func (self Instance) SetOffset(value Vector2.XY)

SetOffset sets the property returned by [GetOffset].

func (Instance) SetOutline

func (self Instance) SetOutline(value bool)

SetOutline sets the property returned by [IsOutline].

func (Instance) SetRange

func (self Instance) SetRange(value Vector2i.XY)

SetRange sets the property returned by [GetRange].

func (Instance) SetRelativeIndex

func (self Instance) SetRelativeIndex(value int)

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

func (self Instance) SetVisible(value bool)

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.

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

func (Instance) Visible

func (self Instance) Visible() bool

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL