Exemplo n.º 1
0
        public override void SetMenuData(object param)
        {
            string path = param as string;

            if (string.IsNullOrEmpty(path))
            {
                return;
            }

            if (categoryTabs == null)
            {
                categoryTabs = controller.transform.GetMonoILRComponent <UIConditionTabController>("ContentView");
            }

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

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

            List <EventDelegate> eventDelegates = categoryTabs.TabLibPrefabs[categoryindex].TabObj.GetComponent <UIEventTrigger>().onPress;

            for (int i = 0; i < eventDelegates.Count; i++)
            {
                eventDelegates[i].Execute();
            }
        }
Exemplo n.º 2
0
        public override void Awake()
        {
            base.Awake();
            Controller   = mDMono.transform.parent.GetUIControllerILRComponent <LTNewHeroBattleHudController>();
            categoryTabs = mDMono.transform.GetMonoILRComponent <UIConditionTabController>("ContentView");
            categoryTabs.TabLibPrefabs = new List <UITabControllerHotFix.TabLibEntry>();
            gridScroll = mDMono.transform.GetMonoILRComponent <LTHeroBattleGridScrolll>("ContentView/Views/Scroll View/Placeholder/Grid");

            InitUITab();
        }
Exemplo n.º 3
0
        public override void Awake()
        {
            base.Awake();

            if (categoryTabs == null)
            {
                categoryTabs = controller.transform.GetMonoILRComponent <UIConditionTabController>("ContentView");
                Init();
            }

            CreateModelFx  = UnityHelper.FindTheChildNode(controller.gameObject, "Fx").gameObject;
            DefaultModelGO = UnityHelper.FindTheChildNode(controller.gameObject, "Default").gameObject;
            LobbyTexture   = UnityHelper.GetTheChildNodeComponetScripts <UITexture>(controller.gameObject, "Texture");
            HotfixBtn0     = controller.transform.Find("UINormalFrameBG/CancelBtn").GetComponent <UIButton>();
            HotfixBtn0.onClick.Add(new EventDelegate(OnCancelButtonClick));
        }
Exemplo n.º 4
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();
            }));
        }
Exemplo n.º 5
0
 public override void Awake()
 {
     base.Awake();
     SelfRankLabel              = mDMono.transform.parent.GetComponent <UILabel>("LeftTopHold/SelfServerRankOrder");
     AllRankLabel               = mDMono.transform.parent.GetComponent <UILabel>("LeftTopHold/AllServerRankOrder");
     OnHookincomeLabel          = mDMono.transform.parent.GetComponent <UILabel>("LeftTopHold/OnHookincomeLabel");
     categoryTabs               = mDMono.transform.GetMonoILRComponent <UIConditionTabController>("ContentView");
     categoryTabs.TabLibPrefabs = new List <UITabControllerHotFix.TabLibEntry>();
     gridScroll =
         mDMono.transform.GetMonoILRComponent <HonorRankGridScroll>(
             "ContentView/Views/Scroll View/Placeholder/Grid");
     selfRequest =
         mDMono.transform.GetComponent <UIServerRequest>("ContentView/UpButtons/ButtonGrid/1_Self/Self");
     selfRequest.onResponse.Add(new EventDelegate(mDMono, "OnFetchData"));
     allRequest = mDMono.transform.GetComponent <UIServerRequest>("ContentView/UpButtons/ButtonGrid/0_All/All");
     allRequest.onResponse.Add(new EventDelegate(mDMono, "OnFetchData"));
     HonorArenaRankNeedReq();
     Init();
     Messenger.AddListener(EventName.HonorArenaRankNeedReq, HonorArenaRankNeedReq);
 }
Exemplo n.º 6
0
        public override void Awake()
        {
            base.Awake();

            var t = controller.transform;

            categoryTabs = t.GetMonoILRComponent <UIConditionTabController>("Store/NewBlacksmithView");
            InitConditionTab();

            controller.backButton = t.GetComponent <UIButton>("UINormalFrameBG/CancelBtn");

            m_TopButtonsCollider = controller.FetchComponentList <BoxCollider>(new string[] {
                "Store/NewBlacksmithView/TopButtons/ButtonGrid/0_mystery", "Store/NewBlacksmithView/TopButtons/ButtonGrid/1_alliance",
                "Store/NewBlacksmithView/TopButtons/ButtonGrid/2_arena", "Store/NewBlacksmithView/TopButtons/ButtonGrid/3_ladder",
                "Store/NewBlacksmithView/TopButtons/ButtonGrid/4_herobattle", "Store/NewBlacksmithView/TopButtons/ButtonGrid/5_nation",
                "Store/NewBlacksmithView/TopButtons/ButtonGrid/6_honor_arena"
            });

            controller.FindAndBindingEventTriggerEvent(
                GetList("Store/NewBlacksmithView/TopButtons/ButtonGrid/0_mystery", "Store/NewBlacksmithView/TopButtons/ButtonGrid/0_mystery/EnchantTab1",
                        "Store/NewBlacksmithView/TopButtons/ButtonGrid/1_alliance", "Store/NewBlacksmithView/TopButtons/ButtonGrid/1_alliance/ConvertTab1",
                        "Store/NewBlacksmithView/TopButtons/ButtonGrid/2_arena", "Store/NewBlacksmithView/TopButtons/ButtonGrid/2_arena/ConvertTab1",
                        "Store/NewBlacksmithView/TopButtons/ButtonGrid/3_ladder", "Store/NewBlacksmithView/TopButtons/ButtonGrid/3_ladder/ConvertTab1",
                        "Store/NewBlacksmithView/TopButtons/ButtonGrid/4_herobattle", "Store/NewBlacksmithView/TopButtons/ButtonGrid/4_herobattle/ConvertTab1",
                        "Store/NewBlacksmithView/TopButtons/ButtonGrid/5_nation", "Store/NewBlacksmithView/TopButtons/ButtonGrid/5_nation/ConvertTab1",
                        "Store/NewBlacksmithView/TopButtons/ButtonGrid/6_honor_arena", "Store/NewBlacksmithView/TopButtons/ButtonGrid/6_honor_arena/ConvertTab1"),
                GetList(new EventDelegate(OnLimitButtonClick), new EventDelegate(() => { ButtonFlow(t.FindEx("Store/NewBlacksmithView/TopButtons/ButtonGrid/0_mystery")); }),
                        new EventDelegate(OnLimitButtonClick), new EventDelegate(() => { ButtonFlow(t.FindEx("Store/NewBlacksmithView/TopButtons/ButtonGrid/1_alliance")); }),
                        new EventDelegate(OnLimitButtonClick), new EventDelegate(() => { ButtonFlow(t.FindEx("Store/NewBlacksmithView/TopButtons/ButtonGrid/2_arena")); }),
                        new EventDelegate(OnLimitButtonClick), new EventDelegate(() => { ButtonFlow(t.FindEx("Store/NewBlacksmithView/TopButtons/ButtonGrid/3_ladder")); }),
                        new EventDelegate(OnLimitButtonClick), new EventDelegate(() => { ButtonFlow(t.FindEx("Store/NewBlacksmithView/TopButtons/ButtonGrid/4_herobattle")); }),
                        new EventDelegate(OnLimitButtonClick), new EventDelegate(() => { ButtonFlow(t.FindEx("Store/NewBlacksmithView/TopButtons/ButtonGrid/5_nation")); }),
                        new EventDelegate(OnLimitButtonClick), new EventDelegate(() => { ButtonFlow(t.FindEx("Store/NewBlacksmithView/TopButtons/ButtonGrid/6_honor_arena")); })
                        ));

            t.GetComponent <TweenPosition>("Store/NewBlacksmithView").onFinished.Add(new EventDelegate(() => { FxClipFun(); }));
        }