コード例 #1
0
 private void OnValueChange(CustomCharaScrollController.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))
             {
                 CustomCharaScrollViewInfo component = (CustomCharaScrollViewInfo)((Component)shownItemByIndex).GetComponent <CustomCharaScrollViewInfo>();
                 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 = (CustomCharaScrollController.ScrollData)null;
         if (this.onDeSelect == null)
         {
             return;
         }
         this.onDeSelect();
     }
 }
コード例 #2
0
 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))
         {
             CustomCharaScrollViewInfo component = (CustomCharaScrollViewInfo)((Component)shownItemByIndex).GetComponent <CustomCharaScrollViewInfo>();
             for (int _index = 0; _index < this.countPerRow; ++_index)
             {
                 component.SetToggleON(_index, this.IsNowSelectInfo(component.GetListInfo(_index)));
             }
         }
     }
 }