Ejemplo n.º 1
0
 public void OnClickQualifyGame()
 {
     FusionAudio.PostEvent("UI/General/ButtonClick", !isFirstUpdate);
     if (TabLocks[0])
     {
         return;
     }
     TabController.SelectTab(0);
     CurrentTabValue = LTLegionWarTabValue.Qualify;
 }
Ejemplo n.º 2
0
 private void ResetView()
 {
     if (tabController.TabLibPrefabs[2].TabObj.transform.parent.gameObject.activeSelf)
     {
         EB.IAP.Item[] tempArray = EB.Sparx.Hub.Instance.WalletManager.Payouts;
         bool          hasGift   = false;
         for (int i = 0; i < tempArray.Length; ++i)
         {
             if (tempArray[i].category.CompareTo("comeback") == 0)
             {
                 hasGift = true;
                 break;
             }
         }
         if (!hasGift)
         {
             //礼包按钮隐藏
             tabController.TabLibPrefabs[2].TabObj.transform.parent.gameObject.CustomSetActive(false);
             if (tabController.TabLibPrefabs[2].PressedTabObj.activeSelf)
             {
                 tabController.SelectTab(0);
             }
             tabController.GetComponent <UIGrid>().repositionNow = true;
         }
     }
 }
Ejemplo n.º 3
0
        private void ResetView()
        {
            int tabIndex = 0;
            int count    = 0;

            //添加按钮隐藏判断条件
            for (int i = 1; i < tabController.TabLibPrefabs.Count; i++)
            {
                if (!LTWelfareModel.Instance.JudgeViewClose(i))
                {
                    if (tabIndex == 0)
                    {
                        tabIndex = i;
                    }
                    count++;
                }
                else
                {
                    tabController.TabLibPrefabs[i].TabObj.transform.parent.gameObject.CustomSetActive(false);
                }
            }
            isMoreThenScrollView = count > 5;
            tabController.SelectTab(tabIndex);
            tabController.GetComponent <UIGrid>().repositionNow = true;
        }
Ejemplo n.º 4
0
        public override void SetMenuData(object param)
        {
            string path = param as string;

            InitializeTopButtons();
            SetDiscount();
            if (string.IsNullOrEmpty(path))
            {
                path = "mystery";
            }

            var categoryindex = categoryTabs.TabLibPrefabs.FindIndex(tab => tab.GameViewObj != null && path.StartsWith(tab.GameViewObj.name));

            if (categoryindex < 0)
            {
                EB.Debug.LogWarning("UIStoreController: path {0} not found", path);
                return;
            }

            var entry = categoryTabs.TabLibPrefabs[categoryindex];

            categoryTabs.SelectTab(categoryindex);
            ButtonFlow(categoryTabs.TabLibPrefabs[categoryindex].TabObj.transform.parent);

            path = path.Replace(entry.GameViewObj.name, "").Trim(new char[] { '/' });
            UITabController subTabs = entry.GameViewObj.GetComponentInChildren <UITabController>();

            if (subTabs == null)
            {
                EB.Debug.LogWarning("UIStoreController: sub tab controller not found");
                return;
            }

            var subIndex = subTabs.TabLibPrefabs.FindIndex(tab => tab.GameViewObj != null && path.StartsWith(tab.GameViewObj.name));

            if (subIndex < 0)
            {
                EB.Debug.LogWarning("UIStoreController: sub path {0} not found", path);
                return;
            }

            subTabs.SelectTab(subIndex);
        }