virtualx-engine/doc/classes/RichTextEffect.xml
HaSa1002 bae843a1c9
Docs: Port Code Examples to C# (R, S, T, U)
* RenderingServer
 * RichTextEffect
 * SceneTree
 * SceneTreeTimer
 * ScriptCreateDialog
 * SpinBox
 * Sprite2D
 * StreamPeer
 * String
 * SurfaceTool
 * TextEdit
 * TileMap
 * Tree
 * Tween
 * UDPServer
 * UndoRedo

Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
2021-03-05 18:57:28 +01:00

38 lines
1.7 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<class name="RichTextEffect" inherits="Resource" version="4.0">
<brief_description>
A custom effect for use with [RichTextLabel].
</brief_description>
<description>
A custom effect for use with [RichTextLabel].
[b]Note:[/b] For a [RichTextEffect] to be usable, a BBCode tag must be defined as a member variable called [code]bbcode[/code] in the script.
[codeblocks]
[gdscript]
# The RichTextEffect will be usable like this: `[example]Some text[/example]`
var bbcode = "example"
[/gdscript]
[csharp]
// The RichTextEffect will be usable like this: `[example]Some text[/example]`
public string bbcode = "example";
[/csharp]
[/codeblocks]
[b]Note:[/b] 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.
</description>
<tutorials>
<link title="BBCode in RichTextLabel">https://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link>
<link title="RichTextEffect test project (third-party)">https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link>
</tutorials>
<methods>
<method name="_process_custom_fx" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="char_fx" type="CharFXTransform">
</argument>
<description>
Override this method to modify properties in [code]char_fx[/code]. The method must return [code]true[/code] if the character could be transformed successfully. If the method returns [code]false[/code], it will skip transformation to avoid displaying broken text.
</description>
</method>
</methods>
<constants>
</constants>
</class>