UnityEditor.ASHistoryWindow.MoveSelection C# (CSharp) Méthode

MoveSelection() private méthode

private MoveSelection ( int steps ) : void
steps int
Résultat void
        private void MoveSelection(int steps)
        {
            if (this.m_ChangeLogSelectionGUID != string.Empty)
            {
                this.m_AssetSelectionIndex += steps;
                if (this.m_AssetSelectionIndex < this.m_GUIItems[this.m_ChangesetSelectionIndex].startShowingFrom)
                {
                    this.m_AssetSelectionIndex = this.m_GUIItems[this.m_ChangesetSelectionIndex].startShowingFrom;
                }
                else
                {
                    int lineCount = this.m_GUIItems[this.m_ChangesetSelectionIndex].assets.GetLineCount();
                    if ((this.m_AssetSelectionIndex >= (4 + this.m_GUIItems[this.m_ChangesetSelectionIndex].startShowingFrom)) && (this.m_GUIItems[this.m_ChangesetSelectionIndex].collapsedItemCount != 0))
                    {
                        this.UncollapseListItem(ref this.m_GUIItems[this.m_ChangesetSelectionIndex]);
                    }
                    if (this.m_AssetSelectionIndex >= lineCount)
                    {
                        this.m_AssetSelectionIndex = lineCount - 1;
                    }
                }
                int folder = 0;
                int file = 0;
                if (this.m_GUIItems[this.m_ChangesetSelectionIndex].assets.IndexToFolderAndFile(this.m_AssetSelectionIndex, ref folder, ref file))
                {
                    if (file == -1)
                    {
                        this.m_ChangeLogSelectionGUID = this.m_GUIItems[this.m_ChangesetSelectionIndex].assets.folders[folder].guid;
                    }
                    else
                    {
                        this.m_ChangeLogSelectionGUID = this.m_GUIItems[this.m_ChangesetSelectionIndex].assets.folders[folder].files[file].guid;
                    }
                }
            }
            else
            {
                int direction = (int) Mathf.Sign((float) steps);
                steps = Mathf.Abs(steps);
                int num2 = 0;
                for (int i = 0; i < steps; i++)
                {
                    num2 = this.FindFirstUnfilteredItem(this.m_ChangesetSelectionIndex + direction, direction);
                    if (num2 == -1)
                    {
                        break;
                    }
                    this.m_ChangesetSelectionIndex = num2;
                }
                this.ChangeLogSelectionRev = this.m_Changesets[this.m_ChangesetSelectionIndex].changeset;
            }
        }