lcy
9 天以前 29fd27541c91dc1bf6147c1de5cf5680dfc6cb38
Main/Component/UI/Common/GroupButtonEx.cs
@@ -10,6 +10,7 @@
//关联按钮,其中一个亮起,其他按下,文字颜色对应变更
//数据更新通过SelectBtn更新 或者 GroupButtonExManager.SelectButton
//使用步骤 1.序列化GroupButtonEx类型的按钮,2:初始需设置SelectBtn()选中哪个按钮,其他和按钮使用方法一致
public class GroupButtonEx : ButtonEx
{
    [SerializeField] GroupButtonExManager m_Manager; // 按钮组管理器引用
@@ -77,6 +78,7 @@
        set { m_SelectEffect = value; }
    }
    public bool isLock = false;
    protected override void Awake()
    {
@@ -99,11 +101,13 @@
    public override void OnPointerClick(PointerEventData eventData)
    {
        if (isLock)
            return;
        base.OnPointerClick(eventData);
        SelectBtn();
    }
    // 选中当前按钮
    // 选中当前按钮,只处理刷新显示
    public void SelectBtn(bool forceRefresh = false)
    {
        if (m_State == TitleBtnState.Click && !forceRefresh)