2022-09-29 15:38:55 +02:00
|
|
|
# meta-description: Base template for rich text effects
|
|
|
|
|
|
|
|
@tool
|
2023-09-12 10:52:43 +02:00
|
|
|
# Having a class name is handy for picking the effect in the Inspector.
|
|
|
|
class_name RichText_CLASS_
|
2022-09-29 15:38:55 +02:00
|
|
|
extends _BASE_
|
|
|
|
|
|
|
|
|
|
|
|
# To use this effect:
|
|
|
|
# - Enable BBCode on a RichTextLabel.
|
|
|
|
# - Register this effect on the label.
|
2023-09-12 10:52:43 +02:00
|
|
|
# - Use [_CLASS_SNAKE_CASE_ param=2.0]hello[/_CLASS_SNAKE_CASE_] in text.
|
|
|
|
var bbcode := "_CLASS_SNAKE_CASE_"
|
2022-09-29 15:38:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
func _process_custom_fx(char_fx: CharFXTransform) -> bool:
|
|
|
|
var param: float = char_fx.env.get("param", 1.0)
|
|
|
|
return true
|