示例#1
0
        /// <summary>
        /// Set the style.
        /// </summary>
        /// <param name="styleBackground">Style for the background.</param>
        /// <param name="styleText">Style for the text.</param>
        /// <param name="style">Full style data.</param>
        public virtual void SetStyle(StyleImage styleBackground, StyleText styleText, Style style)
        {
            styleBackground.ApplyTo(Background);

            if ((Owner != null) && (Owner.IsTable))
            {
                Background.sprite = null;

                if (GraphicsBackground != null)
                {
                    GraphicsBackground.ForEach(style.Table.Background.ApplyTo);
                }
            }

            if (GraphicsForeground != null)
            {
                foreach (var gf in GraphicsForeground)
                {
                    if (gf != null)
                    {
                        styleText.ApplyTo(gf.gameObject);
                    }
                }
            }

            ResetGraphics();
        }
        /// <summary>
        /// Set the style.
        /// </summary>
        /// <param name="styleBackground">Style for the background.</param>
        /// <param name="styleText">Style for the text.</param>
        /// <param name="style">Full style data.</param>
        public virtual void SetStyle(StyleImage styleBackground, StyleText styleText, Style style)
        {
            styleBackground.ApplyTo(Background);

            foreach (var gf in GraphicsForeground)
            {
                if (gf != null)
                {
                    styleText.ApplyTo(gf.gameObject);
                }
            }

            var connector = GetComponent <MultipleConnector>();

            connector.color = style.Collections.DefaultColor;
        }
示例#3
0
 /// <summary>
 /// Set the style.
 /// </summary>
 /// <param name="styleBackground">Style for the background.</param>
 /// <param name="styleText">Style for the text.</param>
 /// <param name="style">Full style data.</param>
 public virtual void SetStyle(StyleImage styleBackground, StyleText styleText, Style style)
 {
     styleBackground.ApplyTo(GetComponent <Image>());
 }