2021-01-11 08:54:28 +08:00
|
|
|
/************************************************/
|
|
|
|
|
/* */
|
|
|
|
|
/* Copyright (c) 2018 - 2021 monitor1394 */
|
|
|
|
|
/* https://github.com/monitor1394 */
|
|
|
|
|
/* */
|
|
|
|
|
/************************************************/
|
2020-03-08 10:47:48 +08:00
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
|
|
|
|
|
namespace XCharts
|
|
|
|
|
{
|
2021-04-27 12:47:46 +08:00
|
|
|
public static class TitleStyleHelper
|
2020-03-08 10:47:48 +08:00
|
|
|
{
|
|
|
|
|
public static void CheckTitle(Serie serie, ref bool m_ReinitTitle, ref bool m_UpdateTitleText)
|
|
|
|
|
{
|
|
|
|
|
if (serie.titleStyle.show)
|
|
|
|
|
{
|
|
|
|
|
if (serie.titleStyle.IsInited())
|
|
|
|
|
{
|
|
|
|
|
serie.titleStyle.UpdatePosition(serie.runtimeCenterPos);
|
|
|
|
|
m_UpdateTitleText = true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
m_ReinitTitle = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void UpdateTitleText(Series series)
|
|
|
|
|
{
|
|
|
|
|
foreach (var serie in series.list) UpdateTitleText(serie);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void UpdateTitleText(Serie serie)
|
|
|
|
|
{
|
|
|
|
|
if (serie.titleStyle.show)
|
|
|
|
|
{
|
|
|
|
|
serie.titleStyle.SetText(serie.name);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|