Пример #1
0
    /// <summary>
    /// 设置当前面板模式
    /// </summary>
    /// <param name="mode"></param>
    private void SetMode(ClanPanelMode mode, bool force = false)
    {
        if (mode == panelMode && !force)
        {
            return;
        }

        if (null != m_dic_clanPanlTabs)
        {
            UITabGrid tab = null;
            if (m_dic_clanPanlTabs.TryGetValue(panelMode, out tab))
            {
                tab.SetHightLight(false);
            }
            if (m_dic_clanPanlTabs.TryGetValue(mode, out tab))
            {
                tab.SetHightLight(true);
            }
        }
        panelMode = mode;
        UpdatePanelWidgetsVisibleStatus();
        InitVisbileWidgets();
        BuildModeData();
        UpdatePanel();
        SetApplyRedPoint();
    }
Пример #2
0
    private void InitWidgets()
    {
        m_mgr = DataManager.Manager <ClanManger>();
        m_dic_clanPanlTabs = new Dictionary <ClanPanelMode, UITabGrid>();
        m_dic_clanPanlTs   = new Dictionary <ClanPanelMode, Transform>();
        UITabGrid grid = null;
        Transform ts   = null;

        if (null != m_trans_FunctioToggles && null != m_trans_LeftContent)
        {
            for (ClanPanelMode i = ClanPanelMode.None + 1; i < ClanPanelMode.Max; i++)
            {
                ts = m_trans_FunctioToggles.Find("Clan" + i.ToString());
                if (null != ts)
                {
                    grid = ts.GetComponent <UITabGrid>();
                    if (null == grid)
                    {
                        grid = ts.gameObject.AddComponent <UITabGrid>();
                    }
                    grid.SetGridData(i);
                    grid.RegisterUIEventDelegate(OnUIGridEventDlg);
                    grid.SetHightLight(false);
                    m_dic_clanPanlTabs.Add(i, grid);
                }

                ts = m_trans_LeftContent.Find(i.ToString() + "Content");
                if (null != ts)
                {
                    m_dic_clanPanlTs.Add(i, ts);
                }
            }
        }
    }
Пример #3
0
    protected override void OnJump(UIPanelBase.PanelJumpData jumpData)
    {
        if (null == jumpData)
        {
            jumpData = new PanelJumpData();
        }
        panelMode = ClanPanelMode.None;
        int firstTabData  = -1;
        int secondTabData = -1;

        if (null != jumpData.Tabs)
        {
            if (jumpData.Tabs.Length >= 1)
            {
                firstTabData = jumpData.Tabs[0];
            }

            if (jumpData.Tabs.Length >= 2)
            {
                secondTabData = jumpData.Tabs[1];
            }
        }
        if (firstTabData == -1)
        {
            firstTabData = (int)ClanPanelMode.Info;
        }
        UIFrameManager.Instance.OnCilckTogglePanel(this.PanelId, 1, firstTabData);
        switch (firstTabData)
        {
//             case (int)ClanPanelMode.Info:
//                 SetInfoMode(((secondTabData != -1) ? (ClanInfoMode)secondTabData : ClanInfoMode.Detail));
//                 break;
        case (int)ClanPanelMode.Member:
            SetMemberMode(((secondTabData != -1) ? (ClanMemberMode)secondTabData : ClanMemberMode.Member));
            break;

        case (int)ClanPanelMode.Skill:
            SetSkillMode(((secondTabData != -1) ? (ClanSkillMode)secondTabData : ClanSkillMode.Learn));
            break;

        case (int)ClanPanelMode.Activity:
            SetInfoMode(((secondTabData != -1) ? (ClanInfoMode)secondTabData : ClanInfoMode.Upgrade));
            break;
        }
    }
Пример #4
0
    /// <summary>
    /// 更新
    /// </summary>
    private void UpdatePanelWidgetsVisibleStatus()
    {
        if (null != m_dic_clanPanlTs)
        {
            bool      visble = false;
            Transform ts     = null;
            for (ClanPanelMode i = ClanPanelMode.None; i < ClanPanelMode.Max; i++)
            {
                visble = (i == panelMode);
                if (m_dic_clanPanlTs.TryGetValue(i, out ts) &&
                    ts.gameObject.activeSelf != visble)
                {
                    ts.gameObject.SetActive(visble);
                }

                visble = (i != ClanPanelMode.Info);
            }
        }
    }
Пример #5
0
    /// <summary>
    /// 当前模式是否为mode
    /// </summary>
    /// <param name="mode"></param>
    /// <returns></returns>

    public bool IsPanelMode(ClanPanelMode mode)
    {
        return(panelMode == mode);
    }