mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-14 20:00:09 +00:00
修复Label在初始化时会堆积的问题
This commit is contained in:
@@ -22,6 +22,7 @@ namespace XCharts.Runtime
|
||||
private Align m_Align = Align.Left;
|
||||
private Image m_IconImage;
|
||||
private bool m_Active = true;
|
||||
private bool m_WakeActive = true;
|
||||
|
||||
public Image icon
|
||||
{
|
||||
@@ -56,7 +57,7 @@ namespace XCharts.Runtime
|
||||
protected override void Awake()
|
||||
{
|
||||
raycastTarget = false;
|
||||
SetActive(false, true);
|
||||
SetActive(m_WakeActive, true);
|
||||
}
|
||||
|
||||
public void SetTextPadding(TextPadding padding)
|
||||
@@ -202,6 +203,7 @@ namespace XCharts.Runtime
|
||||
|
||||
public void SetActive(bool flag, bool force = false)
|
||||
{
|
||||
m_WakeActive = flag;
|
||||
if (m_Active == flag && !force) return;
|
||||
if (ChartHelper.SetActive(gameObject, flag))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user