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; } }
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; } }