diff options
author | César Izurieta <cesar@caih.org> | 2022-03-08 01:36:19 -0500 |
---|---|---|
committer | César Izurieta <cesar@caih.org> | 2022-03-08 01:36:19 -0500 |
commit | 42f1697857a29b86cce9a4c5896cba1ee8565cdd (patch) | |
tree | e0ccc2f43861a2a71eb2ab316489f9ca208b49c2 | |
parent | f488a841c7225a4d80abbc04c74079fbbac01c77 (diff) |
Add support to align to left to bbcode
-rw-r--r-- | scene/gui/rich_text_label.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index 1c9eb14a24..bad7be7d42 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -3250,6 +3250,10 @@ void RichTextLabel::append_text(const String &p_bbcode) { push_paragraph(HORIZONTAL_ALIGNMENT_FILL); pos = brk_end + 1; tag_stack.push_front(tag); + } else if (tag == "left") { + push_paragraph(HORIZONTAL_ALIGNMENT_LEFT); + pos = brk_end + 1; + tag_stack.push_front(tag); } else if (tag == "right") { push_paragraph(HORIZONTAL_ALIGNMENT_RIGHT); pos = brk_end + 1; |