From 0541c746eefab98e5fd0786bbca0639c1a47390d Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Fri, 2 Dec 2022 09:50:54 +0200 Subject: [RichTextEffect] Restore missing `relative_index` property. --- scene/gui/rich_text_label.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scene/gui/rich_text_label.cpp') diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index da8b50566d..df41863e74 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -1005,6 +1005,7 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o if (!custom_effect.is_null()) { charfx->elapsed_time = item_custom->elapsed_time; charfx->range = Vector2i(l.char_offset + glyphs[i].start, l.char_offset + glyphs[i].end); + charfx->relative_index = l.char_offset + glyphs[i].start - item_fx->char_ofs; charfx->visibility = txt_visible; charfx->outline = true; charfx->font = frid; @@ -1222,6 +1223,7 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o if (!custom_effect.is_null()) { charfx->elapsed_time = item_custom->elapsed_time; charfx->range = Vector2i(l.char_offset + glyphs[i].start, l.char_offset + glyphs[i].end); + charfx->relative_index = l.char_offset + glyphs[i].start - item_fx->char_ofs; charfx->visibility = txt_visible; charfx->outline = false; charfx->font = frid; -- cgit v1.2.3