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"); }
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); }
public void Initialize() { HelpInfoList = GameObject.Find("ParentalLock/Panel/HelpFeedUI/HelpUI/HelpInfo/HelpInfoList").transform; loopListView = HelpInfoList.GetComponent <LoopListView>(); loopListView.InitListView(HelpUIView.Instance.TotalItemCount, OnGetItemByIndex); }
/// <summary> /// 创建列表 /// </summary> private void CreatPages(Notification _notif) { m_Looplistview.InitListView(-1, OnGetItemByIndex); }