Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

RichTextEffect

繼承: Resource < RefCounted < Object

RichTextLabel 的自訂效果。

說明

A custom effect for a RichTextLabel, which can be loaded in the RichTextLabel inspector or using RichTextLabel.install_effect().

Note: For a RichTextEffect to be usable, a BBCode tag must be defined as a member variable called bbcode in the script.

# The RichTextEffect will be usable like this: `[example]Some text[/example]`
var bbcode = "example"

Note: As soon as a RichTextLabel contains at least one RichTextEffect, it will continuously process the effect unless the project is paused. This may impact battery life negatively.

教學

方法

bool

_process_custom_fx(char_fx: CharFXTransform) virtual const


方法說明

bool _process_custom_fx(char_fx: CharFXTransform) virtual const 🔗

覆蓋該方法以修改 char_fx 中的屬性。如果字元可以被成功轉換,則該方法必須返回 true。如果該方法返回 false,則它將跳過轉換以避免顯示損壞的文字。