示例#1
0
 protected override void Init()
 {
     ScrollView.InitListView(0, null, OnItemUpdated);
     bg    = GetChildImage("Bg");
     block = GetChildButton("Block");
     EventTriggerListener.Get(block.gameObject).onClick = onClick;
     closeBtn = GetChildButton("CloseBtn");
     EventTriggerListener.Get(closeBtn.gameObject).onClick = onClick;
     emptyImage = GetChildImage("emptyImage");
 }
示例#2
0
 public void DefaultRefresh(List <W> dataList, Func <W, int, string> getPrefab)
 {
     _curDataList = dataList;
     _getPrefab   = getPrefab;
     if (!m_IsInit)
     {
         m_IsInit = true;
         m_LoopGroup.InitListView(dataList.Count, OnGetItemByIndex);
     }
     else
     {
         m_LoopGroup.ResetListView();
         m_LoopGroup.SetListItemCount(_curDataList.Count, false);
     }
 }
        // Use this for initialization
        void Start()
        {
            mLoopListView.InitListView(DataSourceMgr.Get.TotalItemCount, OnGetItemByIndex);

            //mSetCountButton = GameObject.Find("ButtonPanel/buttonGroup1/SetCountButton").GetComponent<Button>();
            //mScrollToButton = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToButton").GetComponent<Button>();
            //mAddItemButton = GameObject.Find("ButtonPanel/buttonGroup3/AddItemButton").GetComponent<Button>();
            //mSetCountInput = GameObject.Find("ButtonPanel/buttonGroup1/SetCountInputField").GetComponent<InputField>();
            //mScrollToInput = GameObject.Find("ButtonPanel/buttonGroup2/ScrollToInputField").GetComponent<InputField>();
            //mAddItemInput = GameObject.Find("ButtonPanel/buttonGroup3/AddItemInputField").GetComponent<InputField>();
            //mScrollToButton.onClick.AddListener(OnJumpBtnClicked);
            //mAddItemButton.onClick.AddListener(OnAddItemBtnClicked);
            //mSetCountButton.onClick.AddListener(OnSetItemCountBtnClicked);
            //mBackButton = GameObject.Find("ButtonPanel/BackButton").GetComponent<Button>();
            //mBackButton.onClick.AddListener(OnBackBtnClicked);
        }
示例#4
0
 public void Initialize()
 {
     HelpInfoList = GameObject.Find("ParentalLock/Panel/HelpFeedUI/HelpUI/HelpInfo/HelpInfoList").transform;
     loopListView = HelpInfoList.GetComponent <LoopListView>();
     loopListView.InitListView(HelpUIView.Instance.TotalItemCount, OnGetItemByIndex);
 }
示例#5
0
 /// <summary>
 /// 创建列表
 /// </summary>
 private void CreatPages(Notification _notif)
 {
     m_Looplistview.InitListView(-1, OnGetItemByIndex);
 }