This commit is contained in:
monitor1394
2021-06-18 06:48:11 +08:00
parent f090970cc8
commit 49fd642885
16 changed files with 89 additions and 33 deletions

View File

@@ -12,6 +12,7 @@ namespace XCharts
{
public class ChartLabel : ChartObject
{
private bool m_EmptyStringHideIcon = false;
private bool m_LabelAutoSize = true;
private float m_LabelPaddingLeftRight = 3f;
private float m_LabelPaddingTopBottom = 3f;
@@ -48,6 +49,8 @@ namespace XCharts
}
}
public bool emptyStringHideIcon { set { m_EmptyStringHideIcon = value; } }
public ChartLabel()
{
}
@@ -179,6 +182,10 @@ namespace XCharts
return sizeChange;
}
AdjustIconPos();
if (m_EmptyStringHideIcon)
{
ChartHelper.SetActive(m_IconImage.gameObject, !string.IsNullOrEmpty(text));
}
}
return false;
}