From 89cebd79e8f2d3ed671900d22aa258a3013d0e71 Mon Sep 17 00:00:00 2001 From: belzecue <1931303+belzecue@users.noreply.github.com> Date: Wed, 22 Dec 2021 14:17:47 +0800 Subject: [PATCH] Update CharFXTransform: explain "relative index"/"absolute index" (previously identical) Confusingly, these two properties had identical descriptions even though they measure different things. "relative_index" measures character count from the custom effect's bbcode opening tag. "absolute_index" measures character count from the start of the bbcode text that includes the custom effect. See the code author's own explanation here: https://github.com/godotengine/godot/pull/23658 NOTE: Doco for CharFXTransform.xml has changed significantly in 4.0, where terminology has changed to "glyph". Therefore, proposing this change for 3.x branch only. --- doc/classes/CharFXTransform.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml index 655dff38942..7879bada9c8 100644 --- a/doc/classes/CharFXTransform.xml +++ b/doc/classes/CharFXTransform.xml @@ -14,7 +14,7 @@ - The index of the current character (starting from 0). Setting this property won't affect drawing. + The index of the current character (starting from 0) for the [RichTextLabel]'s BBCode text. Setting this property won't affect drawing. The Unicode codepoint the character will use. This only affects non-whitespace characters. [method @GDScript.ord] can be useful here. For example, the following will replace all characters with asterisks: @@ -42,7 +42,7 @@ The position offset the character will be drawn with (in pixels). - The index of the current character (starting from 0). Setting this property won't affect drawing. + The index of the current character (starting from 0) for this [RichTextEffect] custom block. Setting this property won't affect drawing. If [code]true[/code], the character will be drawn. If [code]false[/code], the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their [member color] to [code]Color(1, 1, 1, 0)[/code] instead.