void Start() { mStateObjects = new GameObject[] { mNormalState, mSelectedState, mDisabledState }; mGridView = this.transform.parent.parent.parent.GetComponent <HS_ListViewBase>(); mDirty = true; foreach (Button btn in this.transform.GetComponentsInChildren <Button>(true)) { Button btnTemp = btn; btn.onClick.AddListener(delegate() { if (btnTemp.interactable) { mGridView.OnCellClick(this, btnTemp.gameObject); } }); } }
// UIListView virtual protected void OnListViewInit(HS_ListViewBase listView, HS_UIListViewCell cell, object data) { }
virtual protected void OnCellCreated(HS_ListViewBase listView) { }