示例#1
0
 /// <summary>
 /// 设置头像相关信息
 /// </summary>
 /// <param name="heads"></param>
 private void SetHeads(List <object> heads)
 {
     for (int i = 0, lenth = heads.Count; i < lenth; i++)
     {
         var view = YxTools.GetChildView(i, HeadItemPrefab, HeadGrid.transform);
         view.UpdateView(heads[i]);
     }
     HeadGrid.repositionNow = true;
 }
示例#2
0
 protected virtual void RefreshView(List <YxData> data, int startIndex = 0)
 {
     for (int i = startIndex, endIndex = data.Count + startIndex; i < endIndex; i++)
     {
         var view     = YxTools.GetChildView(i, ListItem, Table.transform);
         var itemData = data[i - startIndex];
         view.Id = (IdAntitone? _totalCount - i :i + 1).ToString();
         view.UpdateView(itemData);
     }
     Table.repositionNow = true;
 }
示例#3
0
        /// <summary>
        /// 设置时间,局数相关信息
        /// </summary>
        /// <param name="data"></param>
        private void SetItemInfo(RecordDetialItemData data)
        {
            YxTools.TrySetComponentValue(Time, data.Time);
            YxTools.TrySetComponentValue(RoundNum, string.Format(RoundFormat, data.ShowRoundNum));
            YxTools.TrySetComponentValue(ReplayBtnParent, PlayBack);
            var heads = data.HeadDatas;
            int index = 0;

            foreach (var item in heads)
            {
                var view = YxTools.GetChildView(index++, HeadItemPrefab, HeadGrid.transform);
                view.UpdateView(item.Value);
            }
            HeadGrid.repositionNow = true;
        }