Beispiel #1
0
 private void Refresh()
 {
     if (this.Sections == null || this.Sections.Count == 0)
     {
         return;
     }
     using (List <ListPanelItem> .Enumerator enumerator = this.displayAllItems.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             ListPanelItem current = enumerator.Current;
             if (current.IndexInSection == -1)
             {
                 this.DestroySectionItem(current as ListPanel.ListPanelSectionItem);
             }
             else
             {
                 this.DestroyListItem(current);
             }
         }
     }
     this.displayAllItems.Clear();
     this.animationState = ListPanel.AnimationState.None;
     this.terminalState  = ListPanel.TerminalState.None;
     this.animation      = false;
     this.UpdateItems(0f);
 }
Beispiel #2
0
 private bool IsTopTerminalItem(ListPanelItem item)
 {
     if (this.ShowSection)
     {
         if (item.IndexInSection != -1)
         {
             return(false);
         }
         if (!this.ShowEmptySection)
         {
             for (int i = 0; i < this.Sections.Count; i++)
             {
                 if (this.Sections[i].ItemCount != 0)
                 {
                     return(i == item.SectionIndex);
                 }
             }
         }
         else if (item.SectionIndex == 0)
         {
             return(true);
         }
     }
     else if (item.Index == 0)
     {
         return(true);
     }
     return(false);
 }
Beispiel #3
0
        private ListPanelItem CreateListItem()
        {
            ListPanelItem listPanelItem;

            if (this.cacheListItems.Count == 0)
            {
                if (this.itemCreator != null)
                {
                    listPanelItem = this.itemCreator();
                }
                else
                {
                    listPanelItem = new ListPanelItem();
                }
                if (listPanelItem != null)
                {
                    this.AddChildLast(listPanelItem);
                }
            }
            else
            {
                listPanelItem = this.cacheListItems[0];
                this.cacheListItems.Remove(listPanelItem);
            }
            listPanelItem.Width    = this.Width;
            listPanelItem.HideEdge = !this.ShowItemBorder;
            listPanelItem.Visible  = true;
            return(listPanelItem);
        }
Beispiel #4
0
 private bool IsBottomTerminalItem(ListPanelItem item)
 {
     if (this.ShowSection)
     {
         if (!this.ShowEmptySection)
         {
             for (int i = this.Sections.Count - 1; i >= 0; i--)
             {
                 int num       = i;
                 int itemCount = this.Sections[num].ItemCount;
                 if (this.Sections[num].ItemCount != 0)
                 {
                     return(item.SectionIndex == num && item.IndexInSection + 1 == itemCount);
                 }
             }
         }
         else
         {
             int num2       = this.Sections.Count - 1;
             int itemCount2 = this.Sections[num2].ItemCount;
             if (item.SectionIndex == num2 && item.IndexInSection + 1 == itemCount2)
             {
                 return(true);
             }
         }
     }
     else if (this.AllItemCount == item.Index + 1)
     {
         return(true);
     }
     return(false);
 }
Beispiel #5
0
 private void SetPrevListItem(float currentPos, int prevAllIndex, int prevSctionIndex, int prevIndexInSection)
 {
     if (prevSctionIndex != -1)
     {
         ListPanelItem listPanelItem = this.CreateListItem();
         this.UpdateListItem(listPanelItem, prevAllIndex, prevSctionIndex, prevIndexInSection);
         listPanelItem.Y = currentPos - listPanelItem.ContainEdgeHeight;
         this.displayAllItems.Insert(0, listPanelItem);
     }
 }
Beispiel #6
0
 private void ListItemUpdater(ListPanelItem item)
 {
     if (item is PopupList.PopupListPanelItem)
     {
         PopupList.PopupListPanelItem popupListPanelItem = item as PopupList.PopupListPanelItem;
         popupListPanelItem.Height     = 50f;
         popupListPanelItem.Text       = this.ListItems[popupListPanelItem.Index];
         popupListPanelItem.IsSelected = (item.Index == this.listSelectedIndex);
     }
 }
Beispiel #7
0
 private void SetNextListItem(float nextPos, int nextAllIndex, int nextSctionIndex, int nextIndexInSection)
 {
     if (nextSctionIndex != this.Sections.Count)
     {
         ListPanelItem listPanelItem = this.CreateListItem();
         this.UpdateListItem(listPanelItem, nextAllIndex, nextSctionIndex, nextIndexInSection);
         listPanelItem.Y = nextPos;
         this.displayAllItems.Add(listPanelItem);
     }
 }
Beispiel #8
0
        private LiveListPanel.ListItemData CreateListItemData(int index)
        {
            if (this.itemCreator == null)
            {
                return(null);
            }
            LiveListPanel.ListItemData data = null;
            if (this.cacheItemDataList.Count == 0)
            {
                data                = new LiveListPanel.ListItemData();
                data.item           = this.itemCreator();
                data.item.PivotType = PivotType.MiddleCenter;
            }
            else
            {
                data = this.cacheItemDataList[0];
                this.cacheItemDataList.RemoveAt(0);
            }
            ListPanelItem item = data.item;

            item.Width       = this.ItemWidth;
            item.Height      = this.ItemHeight;
            item.Transform3D = Matrix4.Identity;
            item.Index       = index;
            item.Visible     = true;
            item.Y           = (float)item.Index * this.LineHeight + this.LineHeight / 2f - this.scrollPosition;
            if (this.itemUpdater != null)
            {
                this.itemUpdater(item);
            }
            if (this.usingItemDataList.Count == 0 || index > this.ScrollAreaFirstItemIndex)
            {
                if (!this.usingItemDataList.Exists((LiveListPanel.ListItemData listData) => listData.item.Index == data.item.Index))
                {
                    this.usingItemDataList.Add(data);
                }
                else
                {
                    item.Visible = false;
                    this.cacheItemDataList.Add(data);
                }
            }
            else if (!this.usingItemDataList.Exists((LiveListPanel.ListItemData listData) => listData.item.Index == data.item.Index))
            {
                this.usingItemDataList.Insert(0, data);
            }
            else
            {
                item.Visible = false;
                this.cacheItemDataList.Add(data);
            }
            this.SetupItemDataForSlide(data);
            return(data);
        }
Beispiel #9
0
        private void DestroyListItemData(LiveListPanel.ListItemData data)
        {
            ListPanelItem item = data.item;

            item.Visible = false;
            this.usingItemDataList.Remove(data);
            if (!this.cacheItemDataList.Exists((LiveListPanel.ListItemData listData) => listData.item.Index == data.item.Index))
            {
                this.cacheItemDataList.Add(data);
            }
        }
Beispiel #10
0
 public void UpdateItems()
 {
     if (this.itemUpdater != null)
     {
         using (List <ListPanelItem> .Enumerator enumerator = this.displayAllItems.GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 ListPanelItem current = enumerator.Current;
                 this.itemUpdater(current);
             }
         }
     }
 }
Beispiel #11
0
        private void ResetBottomTerminalItems()
        {
            float num = this.Height;

            for (int i = this.displayAllItems.Count - 1; i >= 0; i--)
            {
                ListPanelItem listPanelItem = this.displayAllItems[i];
                listPanelItem.Y = num - listPanelItem.ContainEdgeHeight;
                num             = listPanelItem.Y;
            }
            this.terminalState    = ListPanel.TerminalState.None;
            this.terminalDistance = 0f;
            this.animationState   = ListPanel.AnimationState.None;
            this.animation        = false;
        }
Beispiel #12
0
 private void UpdateListItem(ListPanelItem item, int allIndex, int sectionIndex, int indexInSection)
 {
     item.Index          = allIndex;
     item.SectionIndex   = sectionIndex;
     item.IndexInSection = indexInSection;
     if (this.itemUpdater != null)
     {
         this.itemUpdater(item);
     }
     if (this.displayListItems.Count > 0 && this.displayListItems[0].Index > item.Index)
     {
         this.displayListItems.Insert(0, item);
         return;
     }
     this.displayListItems.Add(item);
 }
Beispiel #13
0
        protected internal override void OnTouchEvent(TouchEventCollection touchEvents)
        {
            base.OnTouchEvent(touchEvents);
            TouchEvent primaryTouchEvent = touchEvents.PrimaryTouchEvent;
            bool       flag = false;

            switch (primaryTouchEvent.Type)
            {
            case TouchEventType.Up:
                if (this.animationState == LiveListPanel.AnimationState.Drag)
                {
                    this.animationState = LiveListPanel.AnimationState.None;
                    this.isScrolling    = false;
                    flag = true;
                }
                this.UpdateScrollBarVisible();
                break;

            case TouchEventType.Down:
            {
                if (this.animationState == LiveListPanel.AnimationState.Flick)
                {
                    this.animationState = LiveListPanel.AnimationState.None;
                }
                float y = primaryTouchEvent.LocalPosition.Y;
                using (List <LiveListPanel.ListItemData> .Enumerator enumerator = this.usingItemDataList.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        LiveListPanel.ListItemData current = enumerator.Current;
                        ListPanelItem item = this.GetItem(current.item.Index + 1);
                        if (item != null && current.item.Y <= y && y < item.Y)
                        {
                            this.scrollBaseIndex = current.item.Index;
                        }
                        current.scrollStartRotationZ = current.slideEndRotationZ;
                    }
                }
                this.UpdateScrollEndRotationZ();
                break;
            }
            }
            if (this.animationState == LiveListPanel.AnimationState.None && !this.isScrolling && !flag)
            {
                touchEvents.Forward = true;
            }
        }
Beispiel #14
0
        private void UpdateBottomTerminalItems()
        {
            int           num           = this.displayAllItems.Count - 1;
            ListPanelItem listPanelItem = this.displayAllItems[num];

            if (this.displayAllItems.Count > 0)
            {
                if (this.terminalState == ListPanel.TerminalState.Bottom)
                {
                    this.terminalDistance -= (this.Height - (listPanelItem.Y + listPanelItem.ContainEdgeHeight)) * 2f;
                }
                else
                {
                    this.terminalDistance -= this.Height - (listPanelItem.Y + listPanelItem.ContainEdgeHeight);
                }
            }
            if (this.terminalDistance < -this.maxTerminalDistance)
            {
                this.terminalDistance = -this.maxTerminalDistance;
                this.scrollVelocity   = 0f;
                if (this.animationState == ListPanel.AnimationState.Flick)
                {
                    this.terminalState = ListPanel.TerminalState.BottomReset;
                }
            }
            if (this.terminalDistance < 0f)
            {
                float num2 = this.Height;
                float num3 = this.terminalDistance * this.terminalDistanceRatio;
                for (int i = num; i >= 0; i--)
                {
                    ListPanelItem listPanelItem2 = this.displayAllItems[i];
                    listPanelItem2.Y = num2 - listPanelItem2.ContainEdgeHeight;
                    num2             = listPanelItem2.Y + num3;
                }
                if (this.terminalState == ListPanel.TerminalState.None)
                {
                    this.terminalState = ListPanel.TerminalState.Bottom;
                    return;
                }
            }
            else
            {
                this.ResetBottomTerminalItems();
            }
        }
Beispiel #15
0
 private void UpdateTopTerminalItems()
 {
     if (this.displayAllItems.Count > 0)
     {
         if (this.terminalState == ListPanel.TerminalState.Top)
         {
             this.terminalDistance += this.displayAllItems[0].Y * 2f;
         }
         else
         {
             this.terminalDistance += this.displayAllItems[0].Y;
         }
     }
     if (this.terminalDistance > this.maxTerminalDistance)
     {
         this.terminalDistance = this.maxTerminalDistance;
         this.scrollVelocity   = 0f;
         if (this.animationState == ListPanel.AnimationState.Flick)
         {
             this.terminalState = ListPanel.TerminalState.TopReset;
         }
     }
     if (this.terminalDistance > 0f)
     {
         float y   = 0f;
         float num = this.terminalDistance * this.terminalDistanceRatio;
         using (List <ListPanelItem> .Enumerator enumerator = this.displayAllItems.GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 ListPanelItem current = enumerator.Current;
                 current.Y = y;
                 y         = current.Y + current.ContainEdgeHeight + num;
             }
         }
         if (this.terminalState == ListPanel.TerminalState.None)
         {
             this.terminalState = ListPanel.TerminalState.Top;
             return;
         }
     }
     else
     {
         this.ResetTopTerminalItems();
     }
 }
Beispiel #16
0
        private void SetPrevItem(float currentPos)
        {
            if (this.displayAllItems.Count == 0)
            {
                return;
            }
            ListPanelItem listPanelItem = this.displayAllItems[0];

            if (!this.IsTopTerminalItem(listPanelItem))
            {
                if (this.ShowSection)
                {
                    if (listPanelItem.IndexInSection == -1)
                    {
                        int prevSectionIndex = this.GetPrevSectionIndex(listPanelItem.SectionIndex);
                        if (this.Sections[prevSectionIndex].ItemCount == 0)
                        {
                            this.SetPrevSectionItem(currentPos, prevSectionIndex);
                            return;
                        }
                        this.SetPrevListItem(currentPos, this.MinDisplayListItemAllIndex - 1, prevSectionIndex, this.Sections[prevSectionIndex].ItemCount - 1);
                        return;
                    }
                    else
                    {
                        if (listPanelItem.IndexInSection == 0)
                        {
                            this.SetPrevSectionItem(currentPos, listPanelItem.SectionIndex);
                            return;
                        }
                        this.SetPrevListItem(currentPos, this.MinDisplayListItemAllIndex - 1, listPanelItem.SectionIndex, listPanelItem.IndexInSection - 1);
                        return;
                    }
                }
                else
                {
                    if (listPanelItem.IndexInSection == 0)
                    {
                        int prevSectionIndex2 = this.GetPrevSectionIndex(listPanelItem.SectionIndex);
                        this.SetPrevListItem(currentPos, this.MinDisplayListItemAllIndex - 1, prevSectionIndex2, this.Sections[prevSectionIndex2].ItemCount - 1);
                        return;
                    }
                    this.SetPrevListItem(currentPos, this.MinDisplayListItemAllIndex - 1, listPanelItem.SectionIndex, listPanelItem.IndexInSection - 1);
                }
            }
        }
Beispiel #17
0
        private void ResetTopTerminalItems()
        {
            float y = 0f;

            using (List <ListPanelItem> .Enumerator enumerator = this.displayAllItems.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    ListPanelItem current = enumerator.Current;
                    current.Y = y;
                    y         = current.Y + current.ContainEdgeHeight;
                }
            }
            this.terminalState    = ListPanel.TerminalState.None;
            this.terminalDistance = 0f;
            this.animationState   = ListPanel.AnimationState.None;
            this.animation        = false;
        }
Beispiel #18
0
 private void SetNextItem(float nextPos)
 {
     if (this.displayAllItems.Count != 0)
     {
         ListPanelItem listPanelItem = this.displayAllItems[this.displayAllItems.Count - 1];
         if (!this.IsBottomTerminalItem(listPanelItem))
         {
             if (this.ShowSection)
             {
                 if (this.Sections[listPanelItem.SectionIndex].ItemCount == listPanelItem.IndexInSection + 1)
                 {
                     this.SetNextSectionItem(nextPos, this.GetNextSectionIndex(listPanelItem.SectionIndex));
                     return;
                 }
                 this.SetNextListItem(nextPos, this.MaxDisplayListItemAllIndex + 1, listPanelItem.SectionIndex, listPanelItem.IndexInSection + 1);
                 return;
             }
             else
             {
                 if (this.Sections[listPanelItem.SectionIndex].ItemCount == listPanelItem.IndexInSection + 1)
                 {
                     this.SetNextListItem(nextPos, this.MaxDisplayListItemAllIndex + 1, this.GetNextSectionIndex(listPanelItem.SectionIndex), 0);
                     return;
                 }
                 this.SetNextListItem(nextPos, this.MaxDisplayListItemAllIndex + 1, listPanelItem.SectionIndex, listPanelItem.IndexInSection + 1);
             }
         }
         return;
     }
     if (this.ShowSection)
     {
         this.SetNextSectionItem(nextPos, this.GetNextSectionIndex(-1));
         return;
     }
     this.SetNextListItem(nextPos, 0, this.GetNextSectionIndex(-1), 0);
 }
Beispiel #19
0
        private bool IsScrollable()
        {
            int num = 0;

            if (this.ShowSection)
            {
                num = this.Sections.Count;
                if (!this.ShowEmptySection)
                {
                    foreach (ListSection current in this.Sections)
                    {
                        if (current.ItemCount <= 0)
                        {
                            num--;
                        }
                    }
                }
            }
            if (this.displayAllItems.Count >= this.AllItemCount + num)
            {
                float num2 = 0f;
                using (List <ListPanelItem> .Enumerator enumerator2 = this.displayAllItems.GetEnumerator())
                {
                    while (enumerator2.MoveNext())
                    {
                        ListPanelItem current2 = enumerator2.Current;
                        num2 += current2.ContainEdgeHeight;
                    }
                }
                if (num2 <= this.Height)
                {
                    return(false);
                }
            }
            return(true);
        }
Beispiel #20
0
 private void DestroyListItem(ListPanelItem item)
 {
     item.Visible = false;
     this.displayListItems.Remove(item);
     this.cacheListItems.Add(item);
 }
Beispiel #21
0
        private float GetItemPosYWithSpring(LiveListPanel.ListItemData data, float scrollPos, float elapsedTime)
        {
            ListPanelItem item = data.item;
            float         num  = 0f;

            if (this.scrollDirection == FourWayDirection.Up)
            {
                if (item.Index <= this.ScrollAreaFirstItemIndex)
                {
                    num = item.Y - ((float)item.Index * this.LineHeight + this.LineHeight / 2f - scrollPos);
                }
                else
                {
                    ListPanelItem item2 = this.GetItem(item.Index - 1);
                    if (item2 != null)
                    {
                        num = item.Y - (item2.Y + this.LineHeight);
                    }
                }
            }
            else if (this.scrollDirection == FourWayDirection.Down)
            {
                if (item.Index >= this.ScrollAreaLastItemIndex)
                {
                    num = item.Y - ((float)item.Index * this.LineHeight + this.LineHeight / 2f - scrollPos);
                }
                else
                {
                    ListPanelItem item3 = this.GetItem(item.Index + 1);
                    if (item3 != null)
                    {
                        num = item.Y - (item3.Y - this.LineHeight);
                    }
                }
            }
            float num2;

            if (this.animationState == LiveListPanel.AnimationState.Drag)
            {
                num2 = this.scrollGravity + 0.01f * (FMath.Abs((float)(this.scrollBaseIndex - item.Index)) - 1f);
            }
            else if (this.animationState == LiveListPanel.AnimationState.Flick)
            {
                num2 = this.scrollGravity + 0.05f * FMath.Abs((float)(this.scrollBaseIndex - item.Index));
            }
            else
            {
                num2 = this.scrollGravity + 0.05f * FMath.Abs((float)(this.scrollBaseIndex - item.Index));
            }
            float num3 = elapsedTime / 16.6f;

            num2 = FMath.Clamp(num2, -1f, 1f);
            float num4 = num * num2 * num3;

            if (num < 0f)
            {
                num4 = FMath.Clamp(num4, num, 0f);
            }
            else
            {
                num4 = FMath.Clamp(num4, 0f, num);
            }
            data.IsScrolling = (FMath.Abs(num) > 1f);
            return(item.Y - num4);
        }
Beispiel #22
0
        private void UpdateItems(float scrollDistance)
        {
            if (this.sections == null || this.sections.Count == 0)
            {
                return;
            }
            if (this.displayAllItems.Count == 0)
            {
                float num = 0f;
                while (num < this.Height)
                {
                    this.SetNextItem(num);
                    if (this.displayAllItems.Count == 0)
                    {
                        break;
                    }
                    ListPanelItem listPanelItem = this.displayAllItems[this.displayAllItems.Count - 1];
                    num = listPanelItem.Y + listPanelItem.ContainEdgeHeight;
                    if (this.IsBottomTerminalItem(listPanelItem))
                    {
                        break;
                    }
                }
            }
            else
            {
                using (List <ListPanelItem> .Enumerator enumerator = this.displayAllItems.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        ListPanelItem current = enumerator.Current;
                        current.Y += scrollDistance;
                    }
                }
                switch (this.terminalState)
                {
                case ListPanel.TerminalState.None:
                {
                    ListPanelItem listPanelItem2 = this.displayAllItems[0];
                    ListPanelItem listPanelItem3 = this.displayAllItems[this.displayAllItems.Count - 1];
                    float         num2           = listPanelItem3.Y + listPanelItem3.ContainEdgeHeight;
                    while (listPanelItem2.Y > 0f)
                    {
                        if (this.IsTopTerminalItem(listPanelItem2))
                        {
                            this.UpdateTopTerminalItems();
//							IL_1C6:
                            while (num2 < this.Height)
                            {
                                if (this.IsTopTerminalItem(listPanelItem2) && num2 - listPanelItem2.Y < this.Height)
                                {
                                    this.UpdateTopTerminalItems();
                                    break;
                                }
                                if (this.IsBottomTerminalItem(listPanelItem3))
                                {
                                    this.UpdateBottomTerminalItems();
                                    break;
                                }
                                this.SetNextItem(num2);
                                listPanelItem3 = this.displayAllItems[this.displayAllItems.Count - 1];
                                num2           = listPanelItem3.Y + listPanelItem3.ContainEdgeHeight;
                            }
                            goto IL_1E0;
                        }
                        this.SetPrevItem(listPanelItem2.Y);
                        listPanelItem2 = this.displayAllItems[0];
                    }
//					goto IL_1C6;
                    while (num2 < this.Height)
                    {
                        if (this.IsTopTerminalItem(listPanelItem2) && num2 - listPanelItem2.Y < this.Height)
                        {
                            this.UpdateTopTerminalItems();
                            break;
                        }
                        if (this.IsBottomTerminalItem(listPanelItem3))
                        {
                            this.UpdateBottomTerminalItems();
                            break;
                        }
                        this.SetNextItem(num2);
                        listPanelItem3 = this.displayAllItems[this.displayAllItems.Count - 1];
                        num2           = listPanelItem3.Y + listPanelItem3.ContainEdgeHeight;
                    }
                    goto IL_1E0;
                }

                case ListPanel.TerminalState.Top:
                case ListPanel.TerminalState.TopReset:
                    this.UpdateTopTerminalItems();
                    break;

                case ListPanel.TerminalState.Bottom:
                case ListPanel.TerminalState.BottomReset:
                    this.UpdateBottomTerminalItems();
                    break;
                }
IL_1E0:
                if (this.terminalState == ListPanel.TerminalState.None)
                {
                    List <ListPanelItem> list = new List <ListPanelItem>();
                    using (List <ListPanelItem> .Enumerator enumerator2 = this.displayAllItems.GetEnumerator())
                    {
                        while (enumerator2.MoveNext())
                        {
                            ListPanelItem current2 = enumerator2.Current;
                            if (current2.Y + current2.ContainEdgeHeight < 0f || current2.Y > this.Height)
                            {
                                list.Add(current2);
                            }
                        }
                    }
                    using (List <ListPanelItem> .Enumerator enumerator3 = list.GetEnumerator())
                    {
                        while (enumerator3.MoveNext())
                        {
                            ListPanelItem current3 = enumerator3.Current;
                            if (current3 is ListPanel.ListPanelSectionItem)
                            {
                                this.DestroySectionItem(current3 as ListPanel.ListPanelSectionItem);
                            }
                            else
                            {
                                this.DestroyListItem(current3);
                            }
                            this.displayAllItems.Remove(current3);
                        }
                    }
                }
            }
            this.UpdateScrollBar();
        }
Beispiel #23
0
        private void UpdateTransform3D(LiveListPanel.ListItemData data, float elapsedTime)
        {
            ListPanelItem item = data.item;
            Vector3       vector;
            float         num;
            float         num2;

            if (data.IsSliding)
            {
                if (data.SlideElapsedTime > 0f)
                {
                    vector = new Vector3(AnimationUtility.EaseOutQuadInterpolator(data.slideStartPos.X, data.slideEndPos.X, data.SlideElapsedTime / this.itemSlideInTime), AnimationUtility.EaseOutQuadInterpolator(data.slideStartPos.Y, data.slideEndPos.Y, data.SlideElapsedTime / this.itemSlideInTime), AnimationUtility.EaseOutQuintInterpolator(data.slideStartPos.Z, data.slideEndPos.Z, data.SlideElapsedTime / this.itemSlideInTime));
                    num    = AnimationUtility.EaseOutQuadInterpolator(data.slideStartRotationZ, data.slideEndRotationZ, data.SlideElapsedTime / this.itemSlideInTime);
                    num2   = AnimationUtility.EaseOutQuadInterpolator(data.slideStartRotationY, 0f, data.SlideElapsedTime / this.itemSlideInTime);
                }
                else
                {
                    vector = data.slideStartPos;
                    num    = data.slideStartRotationZ;
                    num2   = data.slideStartRotationY;
                    if (this.scrollDirection == FourWayDirection.Up)
                    {
                        item.Y = data.slideStartPos.Y + this.Height;
                    }
                }
            }
            else
            {
                vector = data.slideEndPos;
                num    = data.slideEndRotationZ;
                num2   = 0f;
            }
            float num3 = (this.scrollPosition < 0f) ? 0f : ((this.scrollPosition > this.MaxScrollPosition) ? this.MaxScrollPosition : this.scrollPosition);

            if (this.animationState == LiveListPanel.AnimationState.Drag || this.animationState == LiveListPanel.AnimationState.Flick)
            {
                if ((this.scrollDirection == FourWayDirection.Down && item.Index >= this.scrollBaseIndex) || (this.scrollDirection == FourWayDirection.Up && item.Index <= this.scrollBaseIndex))
                {
                    vector.Y += (float)item.Index * this.LineHeight + this.LineHeight / 2f - num3;
                }
                else
                {
                    vector.Y = this.GetItemPosYWithSpring(data, num3, elapsedTime);
                }
            }
            else
            {
                vector.Y = this.GetItemPosYWithSpring(data, num3, elapsedTime);
            }
            vector.X += this.Width / 2f;
            if (this.isMoveX)
            {
                vector.X += (data.scrollEndPosX - data.slideEndPos.X) * (vector.Y - data.slideEndPos.Y) / this.Height;
            }
            if (this.isMoveZ)
            {
                data.slideEndRotationZ = MathUtility.Lerp(data.scrollStartRotationZ, data.scrollEndRotationZ, data.totalScrollIncrement / (this.Height * (1.01f - this.rotationSpeed)));
            }
            float num4 = 0f;

            if (this.scrollPosition < 0f || this.scrollPosition > this.MaxScrollPosition)
            {
                float num5 = AnimationUtility.EaseOutQuadInterpolator(this.terminalAnimationFactor, 0f, FMath.Clamp(this.terminalResetElapsedTime / 100f, 0f, 1f));
                if (this.scrollPosition < 0f)
                {
                    num5 *= (float)Math.Max(4 - item.Index, 0);
                }
                else
                {
                    num5 *= (float)Math.Max(4 - (this.ItemCount - 1 - item.Index), 0);
                }
                num4     += (float)(LiveListPanel.rand.NextDouble() - 0.5) / 10f * num5;
                num2     += (float)(LiveListPanel.rand.NextDouble() - 0.5) / 20f * num5;
                num      += (float)(LiveListPanel.rand.NextDouble() - 0.5) / 40f * num5;
                vector.X += (float)(LiveListPanel.rand.NextDouble() - 0.5) * 4f * num5;
                vector.Y += (float)(LiveListPanel.rand.NextDouble() - 0.5) * 4f * num5;
                vector.Z += (float)(LiveListPanel.rand.NextDouble() - 0.5) * 4f * num5;
            }
            item.Transform3D = Matrix4.Translation(vector) * Matrix4.RotationZ(num) * Matrix4.RotationY(num2) * Matrix4.RotationX(num4);
        }