class_richtexteffect.rst 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/RichTextEffect.xml.
  6. .. _class_RichTextEffect:
  7. RichTextEffect
  8. ==============
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. A custom effect for use with :ref:`RichTextLabel<class_RichTextLabel>`.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A custom effect for use with :ref:`RichTextLabel<class_RichTextLabel>`.
  15. \ **Note:** For a **RichTextEffect** to be usable, a BBCode tag must be defined as a member variable called ``bbcode`` in the script.
  16. ::
  17. # The RichTextEffect will be usable like this: `[example]Some text[/example]`
  18. var bbcode = "example"
  19. \ **Note:** As soon as a :ref:`RichTextLabel<class_RichTextLabel>` contains at least one **RichTextEffect**, it will continuously process the effect unless the project is paused. This may impact battery life negatively.
  20. .. rst-class:: classref-introduction-group
  21. Tutorials
  22. ---------
  23. - :doc:`../tutorials/ui/bbcode_in_richtextlabel`
  24. - `https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project <https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project>`__
  25. .. rst-class:: classref-reftable-group
  26. Methods
  27. -------
  28. .. table::
  29. :widths: auto
  30. +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`bool<class_bool>` | :ref:`_process_custom_fx<class_RichTextEffect_method__process_custom_fx>` **(** :ref:`CharFXTransform<class_CharFXTransform>` char_fx **)** |virtual| |
  32. +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. .. rst-class:: classref-section-separator
  34. ----
  35. .. rst-class:: classref-descriptions-group
  36. Method Descriptions
  37. -------------------
  38. .. _class_RichTextEffect_method__process_custom_fx:
  39. .. rst-class:: classref-method
  40. :ref:`bool<class_bool>` **_process_custom_fx** **(** :ref:`CharFXTransform<class_CharFXTransform>` char_fx **)** |virtual|
  41. Override this method to modify properties in ``char_fx``. The method must return ``true`` if the character could be transformed successfully. If the method returns ``false``, it will skip transformation to avoid displaying broken text.
  42. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  43. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  44. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  45. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`