RichTextEffect.xml 1.5 KB

1234567891011121314151617181920212223242526272829303132
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="RichTextEffect" inherits="Resource" version="3.4">
  3. <brief_description>
  4. A custom effect for use with [RichTextLabel].
  5. </brief_description>
  6. <description>
  7. A custom effect for use with [RichTextLabel].
  8. [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.
  9. [codeblock]
  10. # The RichTextEffect will be usable like this: `[example]Some text[/example]`
  11. var bbcode = "example"
  12. [/codeblock]
  13. [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.
  14. </description>
  15. <tutorials>
  16. <link>https://docs.godotengine.org/en/3.3/tutorials/gui/bbcode_in_richtextlabel.html</link>
  17. <link>https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link>
  18. </tutorials>
  19. <methods>
  20. <method name="_process_custom_fx" qualifiers="virtual">
  21. <return type="bool">
  22. </return>
  23. <argument index="0" name="char_fx" type="CharFXTransform">
  24. </argument>
  25. <description>
  26. 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.
  27. </description>
  28. </method>
  29. </methods>
  30. <constants>
  31. </constants>
  32. </class>