Merge pull request #90405 from bruvzg/rtl_uni

[RTL] Add support for character code BBCode tag `[char=...]`.
This commit is contained in:
Rémi Verschelde 2024-04-15 13:41:11 +02:00
commit 05b76a9d80
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 4 additions and 0 deletions

View File

@ -4410,6 +4410,10 @@ void RichTextLabel::append_text(const String &p_bbcode) {
push_strikethrough();
pos = brk_end + 1;
tag_stack.push_front(tag);
} else if (tag.begins_with("char=")) {
int32_t char_code = tag.substr(5, tag.length()).hex_to_int();
add_text(String::chr(char_code));
pos = brk_end + 1;
} else if (tag == "lb") {
add_text("[");
pos = brk_end + 1;