Skip to content

RichTextEffect

eduardgushchin edited this page Oct 22, 2026 · 1 revision

Home | API by Category | Complete API Index | API Status

Field Value
Full name Electron2D.RichTextEffect
Namespace Electron2D
Kind class
Category API Scene

Overview

Transforms borrowed glyph state during rich-text recording through a typed C# hook.

Syntax

public class Electron2D.RichTextEffect

Remarks

Labels borrow effects. A custom subtype implements the hook; BBCode names identify installed effects without per-glyph source lookup; compiled Script assets can construct exact typed effect subclasses. Processing takes place on the label's owner thread.

Inherits: Resource

Detailed engine reference

Members

Member Kind Summary
public RichTextEffect() constructor Creates an unnamed effect whose default hook leaves text untransformed.
protected override System.Void CopyCustomStateTo(Electron2D.Resource target, System.Boolean deep, Electron2D.DeepDuplicateMode mode, System.Func<Electron2D.Resource, Electron2D.Resource> duplicate, System.Func<Electron2D.Resource, Electron2D.Resource> force) method
protected override Electron2D.Resource CreateDuplicateInstance() method
protected override System.Collections.Generic.IEnumerable<Electron2D.PropertyDescriptor> GetPropertyDescriptors() method
protected virtual System.Boolean OnProcessCustomFX(Electron2D.CharFXTransform charFX) method Transforms the current glyph state.
public System.String BBCode { get; set; } property Gets or sets this effect's tag identifier.

Member Details

RichTextEffect()

Kind: constructor

public RichTextEffect()

Summary

Creates an unnamed effect whose default hook leaves text untransformed.

CopyCustomStateTo(Electron2D.Resource, System.Boolean, Electron2D.DeepDuplicateMode, System.Func<Electron2D.Resource, Electron2D.Resource>, System.Func<Electron2D.Resource, Electron2D.Resource>)

Kind: method

protected override System.Void CopyCustomStateTo(Electron2D.Resource target, System.Boolean deep, Electron2D.DeepDuplicateMode mode, System.Func<Electron2D.Resource, Electron2D.Resource> duplicate, System.Func<Electron2D.Resource, Electron2D.Resource> force)

CreateDuplicateInstance()

Kind: method

protected override Electron2D.Resource CreateDuplicateInstance()

GetPropertyDescriptors()

Kind: method

protected override System.Collections.Generic.IEnumerable<Electron2D.PropertyDescriptor> GetPropertyDescriptors()

OnProcessCustomFX(Electron2D.CharFXTransform)

Kind: method

protected virtual System.Boolean OnProcessCustomFX(Electron2D.CharFXTransform charFX)

Summary

Transforms the current glyph state.

Returns

True when this transform succeeds; false stops later custom effects for that glyph.

Parameters

  • charFX: Borrowed state, reset for subsequent glyphs.

BBCode

Kind: property

public System.String BBCode { get; set; }

Summary

Gets or sets this effect's tag identifier.

Value

Empty initially; unnamed effects can still be pushed directly.

Clone this wiki locally