Exemple #1
0
 public void SetTextColor(Color color)
 {
     if (m_LabelText != null)
     {
         m_LabelText.SetColor(color);
     }
 }
        public static GameObject Get(string name, Transform parent, LabelStyle label, Color color,
                                     float iconWidth, float iconHeight, ThemeStyle theme)
        {
            GameObject element;

            if (m_Stack.Count == 0 || !Application.isPlaying)
            {
                element = CreateSerieLabel(name, parent, label, color, iconWidth, iconHeight, theme);
            }
            else
            {
                element = m_Stack.Pop();
                if (element == null)
                {
                    element = CreateSerieLabel(name, parent, label, color, iconWidth, iconHeight, theme);
                }
                m_ReleaseDic.Remove(element.GetInstanceID());
                element.name = name;
                element.transform.SetParent(parent);
                var text = new ChartText(element);
                text.SetColor(color);
                text.SetFontAndSizeAndStyle(label.textStyle, theme.common);
                ChartHelper.SetActive(element, true);
            }
            element.transform.localEulerAngles = new Vector3(0, 0, label.rotate);
            return(element);
        }
 public void SetContentColor(Color color)
 {
     if (m_Text != null)
     {
         m_Text.SetColor(color);
     }
 }