修复Label字体样式参数设置无效的问题

This commit is contained in:
monitor1394
2019-11-16 21:16:43 +08:00
parent dc3168747c
commit 5aaa53c503

View File

@@ -30,7 +30,12 @@ namespace XCharts
element = m_Stack.Pop();
element.name = name;
element.transform.SetParent(parent);
element.GetComponentInChildren<Text>().color = color;
element.transform.localEulerAngles = new Vector3(0, 0, label.rotate);
var text = element.GetComponentInChildren<Text>();
text.color = color;
text.font = font;
text.fontSize =label.fontSize;
text.fontStyle = label.fontStyle;
ChartHelper.SetActive(element, true);
}
return element;