mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-16 05:10:12 +00:00
43 lines
1.2 KiB
C#
43 lines
1.2 KiB
C#
/******************************************/
|
|
/* */
|
|
/* Copyright (c) 2018 monitor1394 */
|
|
/* https://github.com/monitor1394 */
|
|
/* */
|
|
/******************************************/
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
namespace XCharts
|
|
{
|
|
internal static class TitleStyleHelper
|
|
{
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
} |