浏览代码

Add support to align to left to bbcode

César Izurieta 3 年之前
父节点
当前提交
42f1697857
共有 1 个文件被更改,包括 4 次插入0 次删除
  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;