Exemple #1
0
        public override void SetMenuData(object param)
        {
            string path          = param as string;
            var    categoryindex = 1;

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

            if (!string.IsNullOrEmpty(path))
            {
                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;
                }
            }
            categoryTabs.SelectTab(categoryindex);
            categoryTabs.PressEventList.Add(new EventDelegate(SetListLogicDataLookup));
        }
Exemple #2
0
        public override void Awake()
        {
            base.Awake();

            var t = controller.transform;

            if (categoryTabs == null)
            {
                categoryTabs = t.GetMonoILRComponent <TaskUITabController>("NewBlacksmithView");
            }

            RedPointList = new List <Transform>();
            RedPointList.Add(t.FindEx("NewBlacksmithView/UpButtons/ButtonGrid/0_Main/RedPoint"));
            RedPointList.Add(t.FindEx("NewBlacksmithView/UpButtons/ButtonGrid/1_Normal/RedPoint"));
            RedPointList.Add(t.FindEx("NewBlacksmithView/UpButtons/ButtonGrid/2_Week/RedPoint"));
            for (int i = 0; i < RedPointList.Count; i++)
            {
                RedPointList[i].gameObject.SetActive(false);
            }
            ListLogicDataLookup = t.GetDataLookupILRComponent <UINormalTaskScrollListLogicDataLookup>("NewBlacksmithView/TaskViews/NormalTask/Scroll View");

            t.GetComponent <UIButton>("UINormalFrameBG/CancelBtn").onClick.Add(new EventDelegate(OnCancelButtonClick));
        }