From 125d7deaff1641d118943f56ef1a2a5b3cd34327 Mon Sep 17 00:00:00 2001 From: Hana <48352564+Piralein@users.noreply.github.com> Date: Wed, 23 Nov 2022 21:47:22 +0100 Subject: add possibility to use only one color --- scene/gui/rich_text_label.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scene') diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 889610e071..a54805ce56 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -3860,6 +3860,10 @@ void RichTextLabel::append_text(const String &p_bbcode) { Color color2 = Color::from_string(subtag_b[1], fallback_color); set_cell_row_background_color(color1, color2); } + if (subtag_b.size() == 1) { + Color color1 = Color::from_string(subtag_a[1], fallback_color); + set_cell_row_background_color(color1, color1); + } } } } -- cgit v1.2.3