コード例 #1
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();
        }