Exemple #1
0
    private void OnRoleClick(CocoUINormalButton btn)
    {
        RoleClickButton t_Btn = (RoleClickButton)btn;

        if (m_CurRoleBtn != null)
        {
            m_CurRoleBtn.ChangeStatus(false);
        }

        GlobalData.curSelectRole = t_Btn.Index;
        t_Btn.ChangeStatus(true);
        m_CurRoleBtn = t_Btn;
    }
Exemple #2
0
    private void InitRoleBtns()
    {
        m_VBtn.OnClickEvent     += OnPopupCloseEvent;
        m_CloseBtn.OnClickEvent += OnPopupCloseEvent;
        for (int i = 0; i < m_RoleBtns.Length; i++)
        {
            if (GlobalData.curSelectRole == i)
            {
                m_RoleBtns[i].ChangeStatus(true);
                m_CurRoleBtn = m_RoleBtns[i];
            }
            else
            {
                m_RoleBtns[i].ChangeStatus(false);
            }

            m_RoleBtns[i].OnClickEvent += OnRoleClick;
        }
    }