示例#1
0
    //根据当前选取的合成材料,显示说明过滤标签页
    //标签页显示规则类似搜索引擎,逐步添加关键字,定位配方
    private void ShowTabFilter()
    {
        List <int> matchFilterTypeList = new List <int>();

        foreach (KeyValuePair <int, List <Tab_QianKunDaiFormula> > pair in TableManager.GetQianKunDaiFormula())
        {
            Tab_QianKunDaiFormula tabFormula = pair.Value[0];
            if (tabFormula == null)
            {
                continue;
            }

            if (IsAllStuffInFormula(tabFormula))
            {
                if (!matchFilterTypeList.Contains(tabFormula.FilterType))
                {
                    matchFilterTypeList.Add(tabFormula.FilterType);
                }
            }
        }

        int nShowTab = GlobeVar.INVALID_ID;

        for (int ii = 1; ii <= MAX_FILTER_TYPE_COUNT; ++ii)
        {
            Transform filterTransform = m_TabFilter.transform.FindChild(ii.ToString());
            if (null != filterTransform)
            {
                if (matchFilterTypeList.Contains(ii))
                {
                    filterTransform.gameObject.SetActive(true);
                    if (GlobeVar.INVALID_ID == nShowTab)
                    {
                        nShowTab = ii;
                    }
                }
                else
                {
                    filterTransform.gameObject.SetActive(false);
                }
            }
        }
        m_TabFilter.GetComponent <UIGrid>().sorted        = true;
        m_TabFilter.GetComponent <UIGrid>().repositionNow = true;
        if (GlobeVar.INVALID_ID == nShowTab)
        {
            m_NullIntroduction.SetActive(true);
            CloseFilter();
        }
        else
        {
            if (null != m_RightFormula && matchFilterTypeList.Contains(m_RightFormula.FilterType))
            {
                nShowTab = m_RightFormula.FilterType;
            }
            m_TabFilter.ChangeTab(nShowTab.ToString());
            m_NullIntroduction.SetActive(false);
        }
        matchFilterTypeList.Clear();
    }
示例#2
0
    void ShowWindow()
    {
        if (null == m_TabButton)
        {
            return;
        }

        if (m_TabNewServerAward != null)
        {
            m_TabNewServerAward.gameObject.SetActive(false);
            UpdateTabButton(TabType.NewServerAward, GlobalData.IsOpenNewServerAwardFlag);
            //return;
//            if ((LoverFlowerWindow.IsOpenAward || GameManager.gameManager.PlayerDataPool.m_IsOpenBaiNian)
//                && m_NewOnlineAwardTip.activeInHierarchy)//如果是情人节点击,显示活动分页
//            {
//                m_TabButton.ChangeTab("Button4-Award");
//                GameManager.gameManager.PlayerDataPool.m_IsOpenBaiNian = false;
//            }
//            // 有签到的情况下优先显示签到
//            else if (m_IsOpenSignInReward && GameManager.gameManager.PlayerDataPool.IsHaveNewSignCanDraw ())
//            {
//                if(m_DaySignInAwardRoot != null && m_TabEveryDaySignInAward.gameObject.activeInHierarchy)
//                {
//                    //m_TabButton.ChangeTab("Button09-AwardSign");
//                    m_TabButton.ChangeTab("Button2_Meiri");

//                }
//            }
//            else if (m_NewServerAwardTip.activeInHierarchy)
//            {
//                //ShowNewServerAward();
//                m_TabButton.ChangeTab("Button1-Award");
//            }
//            else if(m_OnlineAwardTip.activeInHierarchy)
//            {
//                //ShowOnlineAward();
//                m_TabButton.ChangeTab("Button2-Award");
//            }
//            else if (m_DayAwardTip.activeInHierarchy && m_IsOpenOldLoginReward)
//            {
//                //ShowDayAward();
//                m_TabButton.ChangeTab("Button3-Award");
//            }
//            else if (m_NewOnlineAwardTip.activeInHierarchy)
//            {
//                m_TabButton.ChangeTab("Button4-Award");
//            }
//            else if (m_New7DayOnlineAwardTip.activeInHierarchy)
//            {
//                m_TabButton.ChangeTab("Button8-Award");
//            }
//            else if ( m_ReviewNumTip.activeInHierarchy )
//            {
//                //显示评价界面
//                m_TabButton.ChangeTab("Button9-Pingjia");
//            }
//            else
//            {
//                // 无提醒 处理
////                if (m_TabNewServerAward.gameObject.activeInHierarchy)
////                {
////                    //ShowNewServerAward();
////                    m_TabButton.ChangeTab("Button1-Award");
////                }
////                else
////                {
//                    //ShowOnlineAward();
//                    //m_TabButton.ChangeTab("Button2-Award");
//                if(m_IsOpenSignInReward)
//                {
//                    m_TabButton.ChangeTab("Button09-AwardSign");
//                }
//                else
//                {
//                    m_TabButton.ChangeTab("Button2-Award");
//                }

////                }
//            }

//            if (m_ButtonGrid != null)
//            {
//                m_ButtonGrid.repositionNow = true;
//            }
        }
        if (m_TabNewOnlineAward != null)
        {
            if (m_IsShowNewOnlineAward)
            {
                m_TabNewOnlineAward.gameObject.SetActive(true);
            }
            else
            {
                m_TabNewOnlineAward.gameObject.SetActive(false);
            }
            if (m_ButtonGrid != null)
            {
                m_ButtonGrid.repositionNow = true;
            }
            if (m_IsShowNew7DayOnlineAward)
            {
                m_TabNew7DayOnlineAward.gameObject.SetActive(true);
            }
            else
            {
                m_TabNew7DayOnlineAward.gameObject.SetActive(false);
            }
        }

        if (m_TabCDkey != null)
        {
            if (GameManager.gameManager.PlayerDataPool.IsServerFlagOpen(SERVER_FLAGS_ENUM.FLAG_ACTIVATION))
            {
                m_TabCDkey.gameObject.SetActive(true);
                if (m_ButtonGrid != null)
                {
                    m_ButtonGrid.repositionNow = true;
                }
            }
            else
            {
                m_TabCDkey.gameObject.SetActive(false);
            }
        }

        if (m_TabEveryDaySignInAward != null)
        {
            m_TabEveryDaySignInAward.gameObject.SetActive(m_IsOpenSignInReward);
            if (!m_IsOpenSignInReward)
            {
                m_NewSignInAwardTip.SetActive(m_IsOpenSignInReward);
            }
        }

        if (m_TabDayAward != null)
        {
            m_TabDayAward.gameObject.SetActive(m_IsOpenOldLoginReward);
            if (!m_IsOpenOldLoginReward)
            {
                m_DayAwardRoot.gameObject.SetActive(false);
            }
        }
        if (m_TabTianDao != null)
        {
            UpdateTabButton(TabType.TianDao, GlobalData.IsOpenContinueLoginAwardFlag);
        }


        m_TabButton.GetComponent <UIGrid>().repositionNow = true;
    }