Explorar o código

fix RichTextLabel fade set start_index to command offset

semensanyok hai 1 ano
pai
achega
5dffb9b5e6
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      scene/gui/rich_text_label.cpp

+ 2 - 2
scene/gui/rich_text_label.cpp

@@ -4947,10 +4947,10 @@ void RichTextLabel::append_text(const String &p_bbcode) {
 			tag_stack.push_front("outline_size");
 			tag_stack.push_front("outline_size");
 
 
 		} else if (bbcode_name == "fade") {
 		} else if (bbcode_name == "fade") {
-			int start_index = 0;
+			int start_index = brk_pos;
 			OptionMap::Iterator start_option = bbcode_options.find("start");
 			OptionMap::Iterator start_option = bbcode_options.find("start");
 			if (start_option) {
 			if (start_option) {
-				start_index = start_option->value.to_int();
+				start_index += start_option->value.to_int();
 			}
 			}
 
 
 			int length = 10;
 			int length = 10;