From 2330ffb5a15b64f540a03bec6615aeadeb62ff3b Mon Sep 17 00:00:00 2001 From: RedMser Date: Thu, 29 Sep 2022 15:38:55 +0200 Subject: Add GDScript template to RichTextEffect --- .../editor/script_templates/RichTextEffect/default.gd | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 modules/gdscript/editor/script_templates/RichTextEffect/default.gd (limited to 'modules/gdscript/editor') diff --git a/modules/gdscript/editor/script_templates/RichTextEffect/default.gd b/modules/gdscript/editor/script_templates/RichTextEffect/default.gd new file mode 100644 index 0000000000..c79eeb91ec --- /dev/null +++ b/modules/gdscript/editor/script_templates/RichTextEffect/default.gd @@ -0,0 +1,17 @@ +# meta-description: Base template for rich text effects + +@tool +class_name _CLASS_ +extends _BASE_ + + +# To use this effect: +# - Enable BBCode on a RichTextLabel. +# - Register this effect on the label. +# - Use [_CLASS_ param=2.0]hello[/_CLASS_] in text. +var bbcode := "_CLASS_" + + +func _process_custom_fx(char_fx: CharFXTransform) -> bool: + var param: float = char_fx.env.get("param", 1.0) + return true -- cgit v1.2.3