From 884f1acff89e4994a424aecf0a11da294e9c2070 Mon Sep 17 00:00:00 2001 From: Danil Alexeev Date: Fri, 7 Jan 2022 11:40:13 +0300 Subject: Add BBCode escape sequences --- scene/gui/rich_text_label.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scene') diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index fe25d027f6..f1e7203c30 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -3064,6 +3064,12 @@ void RichTextLabel::append_text(const String &p_bbcode) { push_strikethrough(); pos = brk_end + 1; tag_stack.push_front(tag); + } else if (tag == "lb") { + add_text("["); + pos = brk_end + 1; + } else if (tag == "rb") { + add_text("]"); + pos = brk_end + 1; } else if (tag == "lrm") { add_text(String::chr(0x200E)); pos = brk_end + 1; -- cgit v1.2.3