void AddButton( eMainBtnType _type , UIButton _btn , string _text , EZInputDelegate _del , bool isNewImg = false , GameObject goRollingEffect = null , bool isRollingEffect = false ) { if( m_dicBtn.ContainsKey(_type) == true ) return; GameObject go = _btn.gameObject; _btn.Text = _text; _btn.SetInputDelegate( _del ); AsButtonEffect btnEffect = go.AddComponent<AsButtonEffect>(); m_dicBtn.Add( _type , _btn ); if( isNewImg == true ) SetNewImg( _type , isNewImg ); if( goRollingEffect != null ) { btnEffect.RollingEffect = goRollingEffect; btnEffect.SetRollingEffect( isRollingEffect ); } }
public void SetBtnText( eMainBtnType _type , string _text ) { if( m_dicBtn.ContainsKey(_type) == true ) { m_dicBtn[_type].Text = _text; } }
public UIButton GetBtn( eMainBtnType _type ) { if( m_dicBtn.ContainsKey(_type) == true ) return m_dicBtn[_type]; return null; }
public void SetRollingEffect( eMainBtnType _type , bool _isActive) { if( m_dicBtn.ContainsKey(_type) == true ) { AsButtonEffect btnEffect = m_dicBtn[_type].gameObject.GetComponent<AsButtonEffect>(); if( btnEffect != null ) btnEffect.SetRollingEffect(_isActive); } }