Skip to content

Commit

Permalink
Merge pull request #90405 from bruvzg/rtl_uni
Browse files Browse the repository at this point in the history
[RTL] Add support for character code BBCode tag `[char=...]`.
  • Loading branch information
akien-mga committed Apr 15, 2024
2 parents 5b681db + 524a20f commit 05b76a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scene/gui/rich_text_label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 05b76a9

Please sign in to comment.