| | |
| | | set { this.m_Title = value; } |
| | | } |
| | | |
| | | [SerializeField] OutlineEx m_TitleOutline; |
| | | public OutlineEx titleOutline |
| | | { |
| | | get { return this.m_TitleOutline; } |
| | | set { this.m_TitleOutline = value; } |
| | | } |
| | | |
| | | |
| | | |
| | | [SerializeField] UIEffectPlayer m_SelectEffect; //选中特效 |
| | | public UIEffectPlayer selectEffect |
| | | { |
| | |
| | | set { m_SelectEffect = value; } |
| | | } |
| | | |
| | | public bool isLock = false; |
| | | [SerializeField] public RedpointBehaviour redpoint; //外部自己用 |
| | | |
| | | public bool isLock = false; //正常响应按钮点击,但是锁住点击的按钮变化 |
| | | |
| | | protected override void Awake() |
| | | { |
| | |
| | | |
| | | public override void OnPointerClick(PointerEventData eventData) |
| | | { |
| | | base.OnPointerClick(eventData); |
| | | if (isLock) |
| | | return; |
| | | base.OnPointerClick(eventData); |
| | | SelectBtn(); |
| | | } |
| | | |
| | |
| | | // 更新按钮状态 |
| | | public void UpdateButtonState() |
| | | { |
| | | // 更新图标显示 |
| | | if (m_SelectIcon != null) |
| | | m_SelectIcon.SetActive(m_State == TitleBtnState.Click); |
| | | if (m_SelectIcon != null && m_UnSelectIcon != null && m_SelectIcon.sprite == m_UnSelectIcon.sprite) |
| | | { |
| | | m_SelectIcon.SetActive(true); |
| | | } |
| | | else |
| | | { |
| | | // 更新图标显示 |
| | | if (m_SelectIcon != null) |
| | | m_SelectIcon.SetActive(m_State == TitleBtnState.Click); |
| | | |
| | | if (m_UnSelectIcon != null) |
| | | m_UnSelectIcon.SetActive(m_State != TitleBtnState.Click); |
| | | if (m_UnSelectIcon != null) |
| | | m_UnSelectIcon.SetActive(m_State != TitleBtnState.Click); |
| | | } |
| | | |
| | | // 更新文字颜色 |
| | | if (m_Title != null && m_Manager != null) |
| | | { |
| | | m_Title.color = m_Manager.GetTextColorForState(m_State); |
| | | } |
| | | |
| | | if (m_TitleOutline != null && m_Manager != null) |
| | | { |
| | | m_TitleOutline.OutlineColor = m_Manager.GetOutlineColorForState(m_State); |
| | | } |
| | | |
| | | if (m_SelectEffect != null) |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |