| | |
| | | |
| | | //关联按钮,其中一个亮起,其他按下,文字颜色对应变更 |
| | | //数据更新通过SelectBtn更新 或者 GroupButtonExManager.SelectButton |
| | | //使用步骤 1.序列化GroupButtonEx类型的按钮,2:初始需设置SelectBtn()选中哪个按钮,其他和按钮使用方法一致 |
| | | public class GroupButtonEx : ButtonEx |
| | | { |
| | | [SerializeField] GroupButtonExManager m_Manager; // 按钮组管理器引用 |
| | |
| | | set { m_SelectEffect = value; } |
| | | } |
| | | |
| | | public bool isLock = false; |
| | | |
| | | protected override void Awake() |
| | | { |
| | |
| | | |
| | | 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) |