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