Esempio n. 1
0
 protected override void Awake()
 {
     base.Awake();
     if (!StateColorPreset.IsInvStr())
     {
         StateColor = UIConfig.Ins.GetStateColor(StateColorPreset);
     }
     if (Text != null)
     {
         Text.color = StateColor.Normal;
     }
     else if (Image != null)
     {
         Image.color = StateColor.Normal;
     }
     else if (Graphic != null)
     {
         Graphic.color = Color.white;
     }
 }
Esempio n. 2
0
 public override void Init(UControl self)
 {
     base.Init(self);
     if (!StateColorPreset.IsInv() &&
         StateColorPreset != Const.STR_Custom)
     {
         StateColor = UIConfig.Ins.GetStateColor(StateColorPreset);
     }
     if (Text != null)
     {
         Text.color = StateColor.Normal;
     }
     else if (Image != null)
     {
         Image.color = StateColor.Normal;
     }
     else if (Graphic != null)
     {
         Graphic.color = Color.white;
     }
 }