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)) { GameCharaFileInfoComponent component = (GameCharaFileInfoComponent)((Component)shownItemByIndex).GetComponent <GameCharaFileInfoComponent>(); 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()); GameCharaFileInfoComponent component = (GameCharaFileInfoComponent)((Component)loopListViewItem2).GetComponent <GameCharaFileInfoComponent>(); for (int _index1 = 0; _index1 < this.countPerRow; ++_index1) { GameCharaFileScrollController.ScrollData data = this.scrollerDatas.SafeGet <GameCharaFileScrollController.ScrollData>(_index * this.countPerRow + _index1); component.SetData(_index1, data?.info, (Action <bool>)(_isOn => this.OnValueChange(data, _isOn))); component.SetToggleON(_index1, this.IsNowSelectInfo(data?.info)); } return(loopListViewItem2); }
private void OnValueChange(GameCharaFileScrollController.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)) { GameCharaFileInfoComponent component = (GameCharaFileInfoComponent)((Component)shownItemByIndex).GetComponent <GameCharaFileInfoComponent>(); for (int _index = 0; _index < this.countPerRow; ++_index) { if (!this.IsNowSelectInfo(component.GetListInfo(_index))) { component.SetToggleON(_index, false); } } } } this.onSelect(this.selectInfo.info); } else { if (!this.IsNowSelectInfo(_data?.info)) { return; } this.selectInfo = (GameCharaFileScrollController.ScrollData)null; if (this.onDeSelect == null) { return; } this.onDeSelect(); } }