コード例 #1
0
        internal static Data ForChange(ChangeInfo changeInfo)
        {
            ItemIconImageType type = ChangeInfoView.
                                     GetIconImageType(changeInfo);

            if (ChangeTypesOperator.AreAllSet(
                    changeInfo.ChangeTypes, ChangeTypes.Added))
            {
                return(BuildData.ForAdded());
            }

            switch (type)
            {
            case ItemIconImageType.Ignored:
                return(BuildData.ForIgnored());

            case ItemIconImageType.Private:
                return(BuildData.ForPrivated());

            case ItemIconImageType.Deleted:
                return(BuildData.ForDeleted());

            case ItemIconImageType.CheckedOut:
                return(BuildData.ForCheckedOut());

            default:
                return(null);
            }
        }
コード例 #2
0
ファイル: DependenciesDialog.cs プロジェクト: shuwithu/Faces
        void DoDependenciesArea()
        {
            // NOTE(rafa): We cannot use a tree view here because it misbehaves with the way we create the modals
            mScrollPosition = EditorGUILayout.BeginScrollView(mScrollPosition, GUILayout.Height(200));

            for (int i = 0; i < mChangesDependencies.Count; i++)
            {
                var  dependant  = mChangesDependencies[i];
                bool isExpanded = mExpandedDependencies[i];

                isExpanded = EditorGUILayout.Foldout(
                    isExpanded,
                    ChangeInfoView.GetPathDescription(
                        mWkInfo.ClientPath, dependant.Change),
                    UnityStyles.Dialog.Foldout);

                mExpandedDependencies[i] = isExpanded;

                if (isExpanded)
                {
                    for (int j = 0; j < dependant.Dependencies.Count; j++)
                    {
                        using (new EditorGUILayout.HorizontalScope())
                        {
                            GUILayout.Space(20);
                            GUILayout.Label(
                                ChangeInfoView.GetPathDescription(
                                    mWkInfo.ClientPath, dependant.Dependencies[j]),
                                UnityStyles.Paragraph);
                        }
                    }
                }
            }

            EditorGUILayout.EndScrollView();
        }
コード例 #3
0
        internal static Texture ForPendingChange(
            ChangeInfo changeInfo,
            bool isConflict)
        {
            if (isConflict)
            {
                return(ForConflicted());
            }

            ItemIconImageType type = ChangeInfoView.
                                     GetIconImageType(changeInfo);

            if (ChangeTypesOperator.AreAllSet(
                    changeInfo.ChangeTypes, ChangeTypes.Added))
            {
                return(ForAdded());
            }

            switch (type)
            {
            case ItemIconImageType.Ignored:
                return(ForIgnored());

            case ItemIconImageType.Private:
                return(ForPrivated());

            case ItemIconImageType.Deleted:
                return(ForDeleted());

            case ItemIconImageType.CheckedOut:
                return(ForCheckedOut());

            default:
                return(null);
            }
        }