Add GDScript template to RichTextEffect

This commit is contained in:
RedMser
2022-09-29 15:38:55 +02:00
committed by Yuri Sizov
parent 3db40355a0
commit 2330ffb5a1
2 changed files with 19 additions and 0 deletions

View File

@@ -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