diff options
author | Danil Alexeev <danil@alexeev.xyz> | 2022-01-07 11:40:13 +0300 |
---|---|---|
committer | Danil Alexeev <danil@alexeev.xyz> | 2022-01-07 11:40:13 +0300 |
commit | 884f1acff89e4994a424aecf0a11da294e9c2070 (patch) | |
tree | e122a7c91d1f6a8ecccb105152748fc9f02576c8 | |
parent | 697fb6e8747a768955d68a74d723effe5ba34d9d (diff) |
Add BBCode escape sequences
-rw-r--r-- | scene/gui/rich_text_label.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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; |