private void OnValueChange(CustomClothesScrollController.ScrollData _data, bool _isOn) { if (_isOn) { bool flag = !this.IsNowSelectInfo(_data?.info); this.selectInfo = _data; if (!flag) { return; } for (int index = 0; index < this.view.ShownItemCount; ++index) { LoopListViewItem2 shownItemByIndex = this.view.GetShownItemByIndex(index); if (!Object.op_Equality((Object)shownItemByIndex, (Object)null)) { CustomClothesScrollViewInfo component = (CustomClothesScrollViewInfo)((Component)shownItemByIndex).GetComponent <CustomClothesScrollViewInfo>(); for (int _index = 0; _index < this.countPerRow; ++_index) { if (!this.IsNowSelectInfo(component.GetListInfo(_index))) { component.SetToggleON(_index, false); } } } } if (this.onSelect != null) { this.onSelect(this.selectInfo.info); } if (this.selectInfo == null) { return; } this.SelectName = this.selectInfo.info.name; } else { if (!this.IsNowSelectInfo(_data?.info)) { return; } this.selectInfo = (CustomClothesScrollController.ScrollData)null; if (this.onDeSelect == null) { return; } this.onDeSelect(); } }
public void SetNowSelectToggle() { for (int index = 0; index < this.view.ShownItemCount; ++index) { LoopListViewItem2 shownItemByIndex = this.view.GetShownItemByIndex(index); if (!Object.op_Equality((Object)shownItemByIndex, (Object)null)) { CustomClothesScrollViewInfo component = (CustomClothesScrollViewInfo)((Component)shownItemByIndex).GetComponent <CustomClothesScrollViewInfo>(); for (int _index = 0; _index < this.countPerRow; ++_index) { component.SetToggleON(_index, this.IsNowSelectInfo(component.GetListInfo(_index))); } } } }
private LoopListViewItem2 OnUpdate(LoopListView2 _view, int _index) { if (_index < 0) { return((LoopListViewItem2)null); } LoopListViewItem2 loopListViewItem2 = _view.NewListViewItem(((Object)this.original).get_name()); CustomClothesScrollViewInfo component = (CustomClothesScrollViewInfo)((Component)loopListViewItem2).GetComponent <CustomClothesScrollViewInfo>(); for (int _index1 = 0; _index1 < this.countPerRow; ++_index1) { CustomClothesScrollController.ScrollData data = this.scrollerDatas.SafeGet <CustomClothesScrollController.ScrollData>(_index * this.countPerRow + _index1); component.SetData(_index1, data, (Action <bool>)(_isOn => this.OnValueChange(data, _isOn)), new Action <string>(this.OnPointerEnter), new Action(this.OnPointerExit)); component.SetToggleON(_index1, this.IsNowSelectInfo(data?.info)); } return(loopListViewItem2); }