hch
9 天以前 cb653cf75b17b9bdca0b5b9e6b88edf1ca72e90c
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; // 按钮组管理器引用
@@ -103,7 +104,7 @@
        SelectBtn();
    }
    // 选中当前按钮
    // 选中当前按钮,只处理刷新显示
    public void SelectBtn(bool forceRefresh = false)
    {
        if (m_State == TitleBtnState.Click && !forceRefresh)
@@ -115,8 +116,6 @@
            m_Manager.SelectButton(this);
        }
        // 设置当前按钮为选中状态
        state = TitleBtnState.Click;
    }
    // 更新按钮状态