void Delegae_ColorChange(GameObject obj) { if (RadioButtonRoot != null) { //Helper.Log (""); ButtonRadioRoot.ReigisterInstance(RadioButtonRoot).changeCheckedObject(buttonRoot); } UILabel label = gameObject.GetComponent <UILabel> (); if (!isChecked) { isChecked = true; m_isNowChecked = true; label.color = StringToColor(ColorSet.colorArr [(int)showColor]); if (showSize != TxtSize.Default) { label.font = Resources.Load(getPath(), typeof(UIFont)) as UIFont; } else { label.font = m_fNowSize; } if (isEffect) { label.effectStyle = UILabel.Effect.Outline; label.effectColor = new Color(46.0f / 255.0f, 78.0f / 255.0f, 103.0f / 255.0f); label.effectDistance = new Vector2(0.78f, 0.5f); } } }
public void change() { UILabel label = gameObject.GetComponent <UILabel> (); if (m_isNowChecked != isChecked) { if (!m_isNowChecked) { isChecked = false; label.color = m_clrNowColor; label.font = m_fNowSize; transform.localScale = new Vector2(m_nNowSize, m_nNowSize); label.effectStyle = nowEffect; } else { if (ButtonRadioRoot.ReigisterInstance(RadioButtonRoot).objNowObject == null || ButtonRadioRoot.ReigisterInstance(RadioButtonRoot).objNowObject == buttonRoot) { ButtonRadioRoot.ReigisterInstance(RadioButtonRoot).SetObjNowObject(buttonRoot); isChecked = true; label.color = StringToColor(ColorSet.colorArr [(int)showColor]); if (showSize != TxtSize.Default) { label.font = Resources.Load(getPath(), typeof(UIFont)) as UIFont; } else { label.font = m_fNowSize; } if (isEffect) { label.effectStyle = UILabel.Effect.Outline; label.effectColor = new Color(46.0f / 255.0f, 78.0f / 255.0f, 103.0f / 255.0f); label.effectDistance = new Vector2(0.78f, 0.5f); } } else { isChecked = false; m_isNowChecked = false; } } } }