[optimaze][background] rename hideThemeBackgroundColor to autoColor

This commit is contained in:
monitor1394
2022-06-14 07:01:46 +08:00
parent 0880b2f3f9
commit e8c46b676f
5 changed files with 20 additions and 10 deletions

View File

@@ -24,7 +24,7 @@ namespace XCharts.Runtime
chart.chartMaxAnchor, chart.chartPivot, chart.chartSizeDelta);
backgroundImage.sprite = component.image;
backgroundImage.type = component.imageType;
backgroundImage.color = component.imageColor;
backgroundImage.color = chart.theme.GetBackgroundColor(component);
backgroundObj.transform.SetSiblingIndex(0);
backgroundObj.SetActive(component.show);
@@ -32,10 +32,18 @@ namespace XCharts.Runtime
component.refreshComponent();
}
public override void Update()
{
if (component.gameObject != null && component.gameObject.transform.GetSiblingIndex() != 0)
component.gameObject.transform.SetSiblingIndex(0);
}
public override void DrawBase(VertexHelper vh)
{
if (!component.show)
return;
if (component.image != null)
return;
var p1 = new Vector3(chart.chartX, chart.chartY + chart.chartHeight);
var p2 = new Vector3(chart.chartX + chart.chartWidth, chart.chartY + chart.chartHeight);