Beispiel #1
0
        private void Init()
        {
            UITabControllerHotFix.TabLibEntry entry = new UITabControllerHotFix.TabLibEntry();
            Transform mDMono = categoryTabs.mDMono.transform;

            GameObject TabObj1        = mDMono.transform.Find("UpButtons/ButtonGrid/0_All/Tab1").gameObject;
            GameObject PressedTabObj1 = mDMono.transform.Find("UpButtons/ButtonGrid/0_All/Tab2").gameObject;
            GameObject GameViewObj1   = mDMono.transform.Find("UpButtons/ButtonGrid/0_All/All").gameObject;

            entry.TabObj        = TabObj1;
            entry.PressedTabObj = PressedTabObj1;
            entry.GameViewObj   = GameViewObj1;
            categoryTabs.TabLibPrefabs.Add(entry);

            TabObj1.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                categoryTabs.OnTabPressed(TabObj1);
                FetchDataRemote(allRequest);
            }));

            GameObject TabObj2        = mDMono.transform.Find("UpButtons/ButtonGrid/1_Self/Tab1").gameObject;
            GameObject PressedTabObj2 = mDMono.transform.Find("UpButtons/ButtonGrid/1_Self/Tab2").gameObject;
            GameObject GameViewObj2   = mDMono.transform.Find("UpButtons/ButtonGrid/1_Self/Self").gameObject;

            entry.TabObj        = TabObj2;
            entry.PressedTabObj = PressedTabObj2;
            entry.GameViewObj   = GameViewObj2;
            categoryTabs.TabLibPrefabs.Add(entry);

            TabObj2.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                categoryTabs.OnTabPressed(TabObj2);
                FetchDataRemote(selfRequest);
            }));
        }
Beispiel #2
0
        public override void Awake()
        {
            base.Awake();
            var t = controller.transform;

            controller.backButton = t.GetComponent <UIButton>("BG/Top/CloseBtn");
            categoryTabs          = t.GetMonoILRComponent <UIConditionTabController>("BG/Top");

            categoryTabs.TabLibPrefabs = new List <UITabControllerHotFix.TabLibEntry>();
            UITabControllerHotFix.TabLibEntry entry = new UITabControllerHotFix.TabLibEntry();
            Transform  mDMono         = categoryTabs.mDMono.transform;
            GameObject TabObj1        = mDMono.transform.Find("ButtonGrid/0_Cur/Tab1").gameObject;
            GameObject PressedTabObj1 = mDMono.transform.Find("ButtonGrid/0_Cur/Tab2").gameObject;
            GameObject GameViewObj1   = mDMono.transform.Find("ButtonGrid/0_Cur/Cur").gameObject;

            entry.TabObj        = TabObj1;
            entry.PressedTabObj = PressedTabObj1;
            entry.GameViewObj   = GameViewObj1;
            categoryTabs.TabLibPrefabs.Add(entry);

            TabObj1.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                categoryTabs.OnTabPressed(TabObj1);
            }));
            TabObj1.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                GameViewObj1.GetMonoILRComponent <UltimateTrialCompeteCurRankController>().ClickTitleRefreshGrid();
            }));

            GameObject TabObj2        = mDMono.transform.Find("ButtonGrid/1_History/Tab1").gameObject;
            GameObject PressedTabObj2 = mDMono.transform.Find("ButtonGrid/1_History/Tab2").gameObject;
            GameObject GameViewObj2   = mDMono.transform.Find("ButtonGrid/1_History/History").gameObject;

            entry.TabObj        = TabObj2;
            entry.PressedTabObj = PressedTabObj2;
            entry.GameViewObj   = GameViewObj2;
            categoryTabs.TabLibPrefabs.Add(entry);

            TabObj2.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                categoryTabs.OnTabPressed(TabObj2);
            }));
            TabObj2.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                GameViewObj2.GetMonoILRComponent <UltimateTrialCompeteHistoryRankController>().ClickTitleRefreshGrid();
            }));
        }
Beispiel #3
0
        private void InitUITab()
        {
            UITabControllerHotFix.TabLibEntry entry = new UITabControllerHotFix.TabLibEntry();
            Transform mDMono = categoryTabs.mDMono.transform;

            lockSprites    = new GameObject[3];
            lockSprites[0] = mDMono.transform.Find("UpButtons/ButtonGrid/Newbie/Lock").gameObject;
            lockSprites[1] = mDMono.transform.Find("UpButtons/ButtonGrid/Middle/Lock").gameObject;
            lockSprites[2] = mDMono.transform.Find("UpButtons/ButtonGrid/High/Lock").gameObject;
            for (int i = 0; i < lockSprites.Length; i++)
            {
                lockSprites[i].CustomSetActive(GetIsLock(i));
            }
            GameObject TabObj1        = mDMono.transform.Find("UpButtons/ButtonGrid/Newbie/Tab1").gameObject;
            GameObject PressedTabObj1 = mDMono.transform.Find("UpButtons/ButtonGrid/Newbie/Tab2").gameObject;
            GameObject GameViewObj1   = mDMono.transform.Find("UpButtons/ButtonGrid/Newbie/Newbie").gameObject;

            entry.TabObj        = TabObj1;
            entry.PressedTabObj = PressedTabObj1;
            entry.GameViewObj   = GameViewObj1;
            categoryTabs.TabLibPrefabs.Add(entry);

            TabObj1.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                // categoryTabs.OnTabPressed(TabObj1);
                // LTHeroBattleListData[] datas = GetChangllerList(0).ToArray();
                // gridScroll.SetItemDatas(datas);

                Controller.UpdateUI(0);
            }));

            if (!GetIsLock(1))
            {
                GameObject TabObj2        = mDMono.transform.Find("UpButtons/ButtonGrid/Middle/Tab1").gameObject;
                GameObject PressedTabObj2 = mDMono.transform.Find("UpButtons/ButtonGrid/Middle/Tab2").gameObject;
                GameObject GameViewObj2   = mDMono.transform.Find("UpButtons/ButtonGrid/Middle/Middle").gameObject;
                entry.TabObj        = TabObj2;
                entry.PressedTabObj = PressedTabObj2;
                entry.GameViewObj   = GameViewObj2;
                categoryTabs.TabLibPrefabs.Add(entry);

                TabObj2.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
                {
                    // categoryTabs.OnTabPressed(TabObj2);
                    // LTHeroBattleListData[] datas = GetChangllerList(1).ToArray();
                    // gridScroll.SetItemDatas(datas);
                    Controller.UpdateUI(1);
                }));
            }

            if (!GetIsLock(2))
            {
                GameObject TabObj3        = mDMono.transform.Find("UpButtons/ButtonGrid/High/Tab1").gameObject;
                GameObject PressedTabObj3 = mDMono.transform.Find("UpButtons/ButtonGrid/High/Tab2").gameObject;
                GameObject GameViewObj3   = mDMono.transform.Find("UpButtons/ButtonGrid/High/High").gameObject;
                entry.TabObj        = TabObj3;
                entry.PressedTabObj = PressedTabObj3;
                entry.GameViewObj   = GameViewObj3;
                categoryTabs.TabLibPrefabs.Add(entry);

                TabObj3.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
                {
                    // categoryTabs.OnTabPressed(TabObj3);
                    // LTHeroBattleListData[] datas = GetChangllerList(2).ToArray();
                    // gridScroll.SetItemDatas(datas);
                    Controller.UpdateUI(2);
                }));
            }
        }
Beispiel #4
0
        private void InitConditionTab()
        {
            categoryTabs.TabLibPrefabs = new List <UITabControllerHotFix.TabLibEntry>();
            UITabControllerHotFix.TabLibEntry entry = new UITabControllerHotFix.TabLibEntry();

            categoryTabs.NormalTextColor   = Color.white;
            categoryTabs.SelectedTextColor = Color.white;

            var mDMono = categoryTabs.mDMono;

            GameObject TabObj1        = mDMono.transform.Find("TopButtons/ButtonGrid/0_mystery/EnchantTab1").gameObject;
            GameObject PressedTabObj1 = mDMono.transform.Find("TopButtons/ButtonGrid/0_mystery/EnchantTab2").gameObject;
            GameObject GameViewObj1   = mDMono.transform.Find("BlacksmithViews/mystery").gameObject;

            entry.TabObj        = TabObj1;
            entry.PressedTabObj = PressedTabObj1;
            entry.GameViewObj   = GameViewObj1;
            entry.TabTitle      = mDMono.transform.Find("TopButtons/ButtonGrid/0_mystery/Label").GetComponent <UILabel>();

            categoryTabs.TabLibPrefabs.Add(entry);

            TabObj1.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                categoryTabs.OnTabPressed(TabObj1);
            }));

            GameObject TabObj2        = mDMono.transform.Find("TopButtons/ButtonGrid/1_alliance/ConvertTab1").gameObject;
            GameObject PressedTabObj2 = mDMono.transform.Find("TopButtons/ButtonGrid/1_alliance/ConvertTab2").gameObject;
            GameObject GameViewObj2   = mDMono.transform.Find("BlacksmithViews/alliance").gameObject;

            entry.TabObj        = TabObj2;
            entry.PressedTabObj = PressedTabObj2;
            entry.GameViewObj   = GameViewObj2;
            entry.TabTitle      = mDMono.transform.Find("TopButtons/ButtonGrid/1_alliance/Label").GetComponent <UILabel>();

            categoryTabs.TabLibPrefabs.Add(entry);

            TabObj2.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                categoryTabs.OnTabPressed(TabObj2);
            }));

            GameObject TabObj3        = mDMono.transform.Find("TopButtons/ButtonGrid/2_arena/ConvertTab1").gameObject;
            GameObject PressedTabObj3 = mDMono.transform.Find("TopButtons/ButtonGrid/2_arena/ConvertTab2").gameObject;
            GameObject GameViewObj3   = mDMono.transform.Find("BlacksmithViews/arena").gameObject;

            entry.TabObj        = TabObj3;
            entry.PressedTabObj = PressedTabObj3;
            entry.GameViewObj   = GameViewObj3;
            entry.TabTitle      = mDMono.transform.Find("TopButtons/ButtonGrid/2_arena/Label").GetComponent <UILabel>();

            categoryTabs.TabLibPrefabs.Add(entry);

            TabObj3.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                categoryTabs.OnTabPressed(TabObj3);
            }));

            GameObject TabObj4        = mDMono.transform.Find("TopButtons/ButtonGrid/3_ladder/ConvertTab1").gameObject;
            GameObject PressedTabObj4 = mDMono.transform.Find("TopButtons/ButtonGrid/3_ladder/ConvertTab2").gameObject;
            GameObject GameViewObj4   = mDMono.transform.Find("BlacksmithViews/ladder").gameObject;

            entry.TabObj        = TabObj4;
            entry.PressedTabObj = PressedTabObj4;
            entry.GameViewObj   = GameViewObj4;
            entry.TabTitle      = mDMono.transform.Find("TopButtons/ButtonGrid/3_ladder/Label").GetComponent <UILabel>();

            categoryTabs.TabLibPrefabs.Add(entry);

            TabObj4.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                categoryTabs.OnTabPressed(TabObj4);
            }));

            GameObject TabObj5        = mDMono.transform.Find("TopButtons/ButtonGrid/4_herobattle/ConvertTab1").gameObject;
            GameObject PressedTabObj5 = mDMono.transform.Find("TopButtons/ButtonGrid/4_herobattle/ConvertTab2").gameObject;
            GameObject GameViewObj5   = mDMono.transform.Find("BlacksmithViews/herobattle").gameObject;

            entry.TabObj        = TabObj5;
            entry.PressedTabObj = PressedTabObj5;
            entry.GameViewObj   = GameViewObj5;
            entry.TabTitle      = mDMono.transform.Find("TopButtons/ButtonGrid/4_herobattle/Label").GetComponent <UILabel>();

            categoryTabs.TabLibPrefabs.Add(entry);

            TabObj5.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                categoryTabs.OnTabPressed(TabObj5);
            }));

            GameObject TabObj6        = mDMono.transform.Find("TopButtons/ButtonGrid/5_nation/ConvertTab1").gameObject;
            GameObject PressedTabObj6 = mDMono.transform.Find("TopButtons/ButtonGrid/5_nation/ConvertTab2").gameObject;
            GameObject GameViewObj6   = mDMono.transform.Find("BlacksmithViews/nation").gameObject;

            entry.TabObj        = TabObj6;
            entry.PressedTabObj = PressedTabObj6;
            entry.GameViewObj   = GameViewObj6;
            entry.TabTitle      = mDMono.transform.Find("TopButtons/ButtonGrid/5_nation/Label").GetComponent <UILabel>();

            categoryTabs.TabLibPrefabs.Add(entry);

            TabObj6.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                categoryTabs.OnTabPressed(TabObj6);
            }));

            GameObject TabObj7        = mDMono.transform.Find("TopButtons/ButtonGrid/6_honor_arena/ConvertTab1").gameObject;
            GameObject PressedTabObj7 = mDMono.transform.Find("TopButtons/ButtonGrid/6_honor_arena/ConvertTab2").gameObject;
            GameObject GameViewObj7   = mDMono.transform.Find("BlacksmithViews/honor_arena").gameObject;

            entry.TabObj        = TabObj7;
            entry.PressedTabObj = PressedTabObj7;
            entry.GameViewObj   = GameViewObj7;
            entry.TabTitle      = mDMono.transform.Find("TopButtons/ButtonGrid/6_honor_arena/Label").GetComponent <UILabel>();

            categoryTabs.TabLibPrefabs.Add(entry);

            TabObj7.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                categoryTabs.OnTabPressed(TabObj7);
            }));
        }
Beispiel #5
0
        private void Init()
        {
            categoryTabs.TabLibPrefabs = new List <UITabControllerHotFix.TabLibEntry>();
            UITabControllerHotFix.TabLibEntry entry = new UITabControllerHotFix.TabLibEntry();

            Transform mDMono = categoryTabs.mDMono.transform;

            GameObject TabObj1        = mDMono.transform.Find("UpButtons/ButtonGrid/0_Level/Tab1").gameObject;
            GameObject PressedTabObj1 = mDMono.transform.Find("UpButtons/ButtonGrid/0_Level/Tab2").gameObject;
            GameObject GameViewObj1   = mDMono.transform.Find("UpButtons/ButtonGrid/0_Level/Level").gameObject;

            entry.TabObj        = TabObj1;
            entry.PressedTabObj = PressedTabObj1;
            entry.GameViewObj   = GameViewObj1;
            categoryTabs.TabLibPrefabs.Add(entry);

            TabObj1.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                categoryTabs.OnTabPressed(TabObj1);
            }));
            TabObj1.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                GameViewObj1.GetMonoILRComponent <PersonalLevelRankController>().ClickTitleRefreshGrid();
            }));

            GameObject TabObj2        = mDMono.transform.Find("UpButtons/ButtonGrid/1_Legion/Tab1").gameObject;
            GameObject PressedTabObj2 = mDMono.transform.Find("UpButtons/ButtonGrid/1_Legion/Tab2").gameObject;
            GameObject GameViewObj2   = mDMono.transform.Find("UpButtons/ButtonGrid/1_Legion/Alliance").gameObject;

            entry.TabObj        = TabObj2;
            entry.PressedTabObj = PressedTabObj2;
            entry.GameViewObj   = GameViewObj2;
            categoryTabs.TabLibPrefabs.Add(entry);

            TabObj2.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                categoryTabs.OnTabPressed(TabObj2);
            }));
            TabObj2.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                GameViewObj2.GetMonoILRComponent <AllianceLevelRankController>().ClickTitleRefreshGrid();
            }));

            GameObject TabObj3        = mDMono.transform.Find("UpButtons/ButtonGrid/2_Arena/Tab1").gameObject;
            GameObject PressedTabObj3 = mDMono.transform.Find("UpButtons/ButtonGrid/2_Arena/Tab2").gameObject;
            GameObject GameViewObj3   = mDMono.transform.Find("UpButtons/ButtonGrid/2_Arena/Arena").gameObject;

            entry.TabObj        = TabObj3;
            entry.PressedTabObj = PressedTabObj3;
            entry.GameViewObj   = GameViewObj3;
            categoryTabs.TabLibPrefabs.Add(entry);

            TabObj3.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                categoryTabs.OnTabPressed(TabObj3);
            }));
            TabObj3.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                (GameViewObj3.GetMonoILRComponent <PersonalArenaRankController>()).ClickTitleRefreshGrid();
            }));

            GameObject TabObj4        = mDMono.transform.Find("UpButtons/ButtonGrid/3_Ladder/Tab1").gameObject;
            GameObject PressedTabObj4 = mDMono.transform.Find("UpButtons/ButtonGrid/3_Ladder/Tab2").gameObject;
            GameObject GameViewObj4   = mDMono.transform.Find("UpButtons/ButtonGrid/3_Ladder/Ladder").gameObject;

            entry.TabObj        = TabObj4;
            entry.PressedTabObj = PressedTabObj4;
            entry.GameViewObj   = GameViewObj4;
            categoryTabs.TabLibPrefabs.Add(entry);

            TabObj4.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                categoryTabs.OnTabPressed(TabObj4);
            }));
            TabObj4.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                GameViewObj4.GetMonoILRComponent <PersonalLadderRankController>().ClickTitleRefreshGrid();
            }));

            GameObject TabObj5        = mDMono.transform.Find("UpButtons/ButtonGrid/4_ChallengeInstance/Tab1").gameObject;
            GameObject PressedTabObj5 =
                mDMono.transform.Find("UpButtons/ButtonGrid/4_ChallengeInstance/Tab2").gameObject;
            GameObject GameViewObj5 = mDMono.transform
                                      .Find("UpButtons/ButtonGrid/4_ChallengeInstance/ChallengeInstance").gameObject;

            entry.TabObj        = TabObj5;
            entry.PressedTabObj = PressedTabObj5;
            entry.GameViewObj   = GameViewObj5;
            categoryTabs.TabLibPrefabs.Add(entry);

            TabObj5.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                categoryTabs.OnTabPressed(TabObj5);
            }));
            TabObj5.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                GameViewObj5.GetMonoILRComponent <PersonalChallengeInstanceRankController>().ClickTitleRefreshGrid();
            }));

            GameObject TabObj6        = mDMono.transform.Find("UpButtons/ButtonGrid/5_UltimateChallenge/Tab1").gameObject;
            GameObject PressedTabObj6 =
                mDMono.transform.Find("UpButtons/ButtonGrid/5_UltimateChallenge/Tab2").gameObject;
            GameObject GameViewObj6 = mDMono.transform
                                      .Find("UpButtons/ButtonGrid/5_UltimateChallenge/UltimateChallenge").gameObject;

            entry.TabObj        = TabObj6;
            entry.PressedTabObj = PressedTabObj6;
            entry.GameViewObj   = GameViewObj6;
            categoryTabs.TabLibPrefabs.Add(entry);

            TabObj6.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                categoryTabs.OnTabPressed(TabObj6);
            }));
            TabObj6.gameObject.GetComponent <UIEventTrigger>().onPress.Add(new EventDelegate(() =>
            {
                GameViewObj6.GetMonoILRComponent <InfiniteChallengeRankController>().ClickTitleRefreshGrid();
            }));
        }