2019-09-24 17:44:48 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
2022-02-14 21:18:53 +08:00
<class name= "RichTextEffect" inherits= "Resource" version= "4.0" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2019-09-24 17:44:48 +08:00
<brief_description >
2019-12-07 03:50:17 +08:00
A custom effect for use with [RichTextLabel].
2019-09-24 17:44:48 +08:00
</brief_description>
<description >
2019-12-07 03:50:17 +08:00
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.
2020-11-28 07:33:15 +08:00
[codeblocks]
[gdscript]
2019-12-07 03:50:17 +08:00
# The RichTextEffect will be usable like this: `[example]Some text[/example]`
var bbcode = "example"
2020-11-28 07:33:15 +08:00
[/gdscript]
[csharp]
// The RichTextEffect will be usable like this: `[example]Some text[/example]`
public string bbcode = "example";
[/csharp]
[/codeblocks]
2019-12-07 03:50:17 +08:00
[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.
2019-09-24 17:44:48 +08:00
</description>
<tutorials >
2021-11-15 17:43:07 +08:00
<link title= "BBCode in RichTextLabel" > $DOCS_URL/tutorials/ui/bbcode_in_richtextlabel.html</link>
2020-08-05 20:43:40 +08:00
<link title= "RichTextEffect test project (third-party)" > https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link>
2019-09-24 17:44:48 +08:00
</tutorials>
<methods >
2021-08-22 09:52:44 +08:00
<method name= "_process_custom_fx" qualifiers= "virtual const" >
2021-07-30 21:28:05 +08:00
<return type= "bool" />
2022-08-07 02:11:48 +08:00
<param index= "0" name= "char_fx" type= "CharFXTransform" />
2019-09-24 17:44:48 +08:00
<description >
2019-12-07 03:50:17 +08:00
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.
2019-09-24 17:44:48 +08:00
</description>
</method>
</methods>
</class>