Ejemplo n.º 1
0
        private void showDefaultHeader()
        {
            EditorGUILayout.LabelField("Asset Hunter v2.6.3", EditorStyles.boldLabel);
            EditorGUILayout.BeginVertical();
            EditorGUILayout.BeginHorizontal();

            //BUTTON Settings
            EditorGUILayout.Space();
            // GUI.color = AssetHunterHelper.AH_BLUE;
            if (GUILayout.Button(new GUIContent("Edit settings", m_UISettings), GUILayout.Width(btnMinWidth - 70), GUILayout.Height(20)))
            {
                EditorWindow.GetWindow <AssetHunterSettingsWindow>(true, "Asset Hunter Settings");
            }

            //BUTTON Open Log
            EditorGUILayout.Space();
            //GUI.color = AssetHunterHelper.AH_RED;
            if (GUILayout.Button("Open log", GUILayout.MinWidth(100)))
            {
                System.Diagnostics.Process.Start(AssetHunterHelper.GetLogFolderPath());
            }

            //BUTTON delete empty folders
            EditorGUILayout.Space();
            //GUI.color = AssetHunterHelper.AH_BLUE;
            if (GUILayout.Button("Delete empty folders", GUILayout.MinWidth(120)))
            {
                if (EditorUtility.DisplayDialog("Delete empty folder", "Are you sure you want to delete all empty folders", "Yes", "No"))
                {
                    string path        = Application.dataPath;
                    int    deleteCount = 0;
                    deleteEmptyDirectories(path, ref deleteCount);

                    Debug.LogWarning(deleteCount + " empty folders was deleted by Asset Hunter");
                }
            }

            GUILayout.FlexibleSpace();
            EditorGUILayout.EndHorizontal();

            GUILayout.Space(5);

            EditorGUILayout.BeginHorizontal();

            //BUTTON Settings
            EditorGUILayout.Space();
            if (GUILayout.Button("Scene overview", GUILayout.Width(btnMinWidth - 70), GUILayout.Height(20)))
            {
                EditorWindow.GetWindow <AssetHunterSceneOverview>(true, "Asset Hunter Scene Overview");
            }

            GUILayout.FlexibleSpace();
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.Space();

            GUI.color = m_IntialGUIColor;

            //Show logo
            if (m_window && m_window.m_UIWideLogo)
            {
                GUILayout.Label(m_window.m_UIWideLogo);
            }

            //Only show the foldout if we actually have any manually excluded folders or types
            if (settings != null && settings.HasExcludes())
            {
                bShowExcludeFoldout = EditorGUILayout.Foldout(bShowExcludeFoldout, "Show manual excludes");
            }

            EditorGUILayout.EndVertical();
        }