Files
XCharts/Runtime/Theme/LegendTheme.cs

47 lines
1.3 KiB
C#
Raw Normal View History

2021-01-11 08:54:28 +08:00
using System;
using UnityEngine;
using UnityEngine.Serialization;
2021-01-11 08:54:28 +08:00
#if dUI_TextMeshPro
using TMPro;
#endif
2022-02-19 22:37:57 +08:00
namespace XCharts.Runtime
2021-01-11 08:54:28 +08:00
{
[Serializable]
public class LegendTheme : ComponentTheme
{
[SerializeField][FormerlySerializedAs("m_UnableColor")] protected Color m_InactiveColor;
2021-01-11 08:54:28 +08:00
/// <summary>
/// the color of text.
2023-11-11 23:32:24 +08:00
/// ||文本颜色。
2021-01-11 08:54:28 +08:00
/// </summary>
[Obsolete("Use inactiveColor instead.", true)]
2021-01-11 08:54:28 +08:00
public Color unableColor
{
get { return m_InactiveColor; }
set { if (PropertyUtil.SetColor(ref m_InactiveColor, value)) SetComponentDirty(); }
}
/// <summary>
/// the color when the component is inactive.
/// ||非激活状态时的颜色。
/// </summary>
public Color inactiveColor
{
get { return m_InactiveColor; }
set { if (PropertyUtil.SetColor(ref m_InactiveColor, value)) SetComponentDirty(); }
2021-01-11 08:54:28 +08:00
}
public void Copy(LegendTheme theme)
{
base.Copy(theme);
m_InactiveColor = theme.inactiveColor;
2021-01-11 08:54:28 +08:00
}
2021-11-23 13:20:07 +08:00
public LegendTheme(ThemeType theme) : base(theme)
2021-01-11 08:54:28 +08:00
{
m_InactiveColor = ColorUtil.GetColor("#cccccc");
2022-05-22 22:17:38 +08:00
2021-01-11 08:54:28 +08:00
}
}
}