Browse Source

Add support to align to left to bbcode

César Izurieta 3 năm trước cách đây
mục cha
commit
42f1697857
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      scene/gui/rich_text_label.cpp

+ 4 - 0
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;