19 [SerializeField]
protected Font m_Font;
20 [SerializeField]
protected Color m_TextColor;
21 [SerializeField]
protected Color m_TextBackgroundColor;
22 [SerializeField]
protected int m_FontSize = 18;
24 [SerializeField]
protected TMP_FontAsset m_TMPFont;
33 get {
return m_Font; }
34 set { m_Font = value; SetComponentDirty(); }
42 get {
return m_TextColor; }
43 set {
if (PropertyUtil.SetColor(ref m_TextColor, value)) SetComponentDirty(); }
51 get {
return m_TextBackgroundColor; }
52 set {
if (PropertyUtil.SetColor(ref m_TextBackgroundColor, value)) SetComponentDirty(); }
60 get {
return m_FontSize; }
61 set {
if (PropertyUtil.SetStruct(ref m_FontSize, value)) SetComponentDirty(); }
65 public TMP_FontAsset tmpFont
71 get {
return m_TMPFont; }
72 set { m_TMPFont = value; SetComponentDirty(); }
76 public ComponentTheme(
Theme theme)
78 m_FontSize = XChartsSettings.fontSizeLv3;
82 m_TextColor = ColorUtil.GetColor(
"#514D4D");
85 m_TextColor = ColorUtil.GetColor(
"#514D4D");
88 m_TextColor = ColorUtil.GetColor(
"#B9B8CE");
93 public virtual void Copy(ComponentTheme theme)
96 m_FontSize = theme.fontSize;
97 m_TextColor = theme.textColor;
98 m_TextBackgroundColor = theme.textBackgroundColor;
100 m_TMPFont = theme.tmpFont;
104 public virtual void Reset(ComponentTheme defaultTheme)