-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GDScript template to RichTextEffect
- Loading branch information
Showing
2 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
modules/gdscript/editor/script_templates/RichTextEffect/default.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters