From 9388d4497d9bf08ed082522bf5a009bfc682aa91 Mon Sep 17 00:00:00 2001 From: Sean Patrick Hagen Date: Tue, 14 Jul 2026 10:36:07 -0700 Subject: [PATCH 1/2] Add back in the 'Pulse' bbcode example script Seems to have disappeared at some point between now and the v3.2 docs, though it's still referenced in the example below the GDScripts. This just adds back in the script ( and changes `tool` to `@tool` ). --- tutorials/ui/bbcode_in_richtextlabel.rst | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/tutorials/ui/bbcode_in_richtextlabel.rst b/tutorials/ui/bbcode_in_richtextlabel.rst index 75c4303b417..4ee34e94e23 100644 --- a/tutorials/ui/bbcode_in_richtextlabel.rst +++ b/tutorials/ui/bbcode_in_richtextlabel.rst @@ -1251,6 +1251,32 @@ the user fixes whatever error cropped up in their custom effect logic. Here are some examples of custom effects: +Pulse +~~~~~ + +:: + @tool + extends RichTextEffect + class_name RichTextPulse + + # Syntax: [pulse color=#00FFAA height=0.0 freq=2.0][/pulse] + + # Define the tag name. + var bbcode = "pulse" + + func _process_custom_fx(char_fx): + # Get parameters, or use the provided default value if missing. + var color = char_fx.env.get("color", char_fx.color) + var height = char_fx.env.get("height", 0.0) + var freq = char_fx.env.get("freq", 2.0) + + var sined_time = (sin(char_fx.elapsed_time * freq) + 1.0) / 2.0 + var y_off = sined_time * height + color.a = 1.0 + char_fx.color = char_fx.color.linear_interpolate(color, sined_time) + char_fx.offset = Vector2(0, -1) * y_off + return true + Ghost ~~~~~ From d9537d8120304fa4ca67db6e2bc80d3d07555e93 Mon Sep 17 00:00:00 2001 From: Sean Patrick Hagen Date: Thu, 16 Jul 2026 12:05:02 -0700 Subject: [PATCH 2/2] Clean up examples --- tutorials/ui/bbcode_in_richtextlabel.rst | 29 +----------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/tutorials/ui/bbcode_in_richtextlabel.rst b/tutorials/ui/bbcode_in_richtextlabel.rst index 4ee34e94e23..826586d5b17 100644 --- a/tutorials/ui/bbcode_in_richtextlabel.rst +++ b/tutorials/ui/bbcode_in_richtextlabel.rst @@ -1251,32 +1251,6 @@ the user fixes whatever error cropped up in their custom effect logic. Here are some examples of custom effects: -Pulse -~~~~~ - -:: - @tool - extends RichTextEffect - class_name RichTextPulse - - # Syntax: [pulse color=#00FFAA height=0.0 freq=2.0][/pulse] - - # Define the tag name. - var bbcode = "pulse" - - func _process_custom_fx(char_fx): - # Get parameters, or use the provided default value if missing. - var color = char_fx.env.get("color", char_fx.color) - var height = char_fx.env.get("height", 0.0) - var freq = char_fx.env.get("freq", 2.0) - - var sined_time = (sin(char_fx.elapsed_time * freq) + 1.0) / 2.0 - var y_off = sined_time * height - color.a = 1.0 - char_fx.color = char_fx.color.linear_interpolate(color, sined_time) - char_fx.offset = Vector2(0, -1) * y_off - return true - Ghost ~~~~~ @@ -1343,5 +1317,4 @@ This will add a few new BBCode commands, which can be used like so: .. code-block:: none - [center][ghost]This is a custom [matrix]effect[/matrix][/ghost] made in - [pulse freq=5.0 height=2.0][pulse color=#00FFAA freq=2.0]GDScript[/pulse][/pulse].[/center] + [center][ghost]This is a custom effect[/ghost] made in [matrix]GDScript[/matrix][/center]