Ejemplo n.º 1
0
        private static void TreeWindow(int id)
        {
            GUILayout.BeginVertical();
            {
                _folderTreeView.DrawDirectoryTree();

                GUILayout.BeginVertical(GUI.skin.box, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(false));
                {
                    if (GUILayout.Button("Refresh thumbnails"))
                    {
                        _folderTreeView?.ResetTreeCache();
                        RefreshCurrentWindow();
                    }

                    GUILayout.Space(1);

                    if (GUILayout.Button("Current folder"))
                    {
                        Utils.OpenDirInExplorer(_folderTreeView.CurrentFolder);
                    }
                    if (GUILayout.Button("Screenshot folder"))
                    {
                        Utils.OpenDirInExplorer(Path.Combine(Utils.NormalizePath(UserData.Path), "cap"));
                    }
                    if (GUILayout.Button("Main game folder"))
                    {
                        Utils.OpenDirInExplorer(Path.GetDirectoryName(Utils.NormalizePath(UserData.Path)));
                    }
                }
                GUILayout.EndVertical();
            }
            GUILayout.EndVertical();
        }
Ejemplo n.º 2
0
        private static void TreeWindow(int id)
        {
            GUILayout.BeginHorizontal();
            {
                _folderTreeView.DrawDirectoryTree();

                GUILayout.BeginVertical(GUI.skin.box, GUILayout.Width(200));
                {
                    if (GUILayout.Button("Refresh scene thumbnails"))
                    {
                        _folderTreeView?.ResetTreeCache();
                        OnFolderChanged();
                    }

                    GUILayout.FlexibleSpace();

                    if (GUILayout.Button("Open current folder in explorer"))
                    {
                        Utils.OpenDirInExplorer(_folderTreeView.CurrentFolder);
                    }
                    if (GUILayout.Button("Open screenshot folder in explorer"))
                    {
                        Utils.OpenDirInExplorer(Path.Combine(AI_BrowserFolders.UserDataPath, "cap"));
                    }
                    if (GUILayout.Button("Open character folder in explorer"))
                    {
                        Utils.OpenDirInExplorer(Path.Combine(AI_BrowserFolders.UserDataPath, "chara"));
                    }
                    if (GUILayout.Button("Open main game folder in explorer"))
                    {
                        Utils.OpenDirInExplorer(Paths.GameRootPath);
                    }
                }
                GUILayout.EndVertical();
            }
            GUILayout.EndHorizontal();
        }
        private static void TreeWindow(int id)
        {
            GUILayout.BeginHorizontal();
            {
                _folderTreeView.DrawDirectoryTree();

                GUILayout.BeginVertical(GUI.skin.box, GUILayout.Width(200));
                {
                    if (GUILayout.Button("Refresh scene thumbnails"))
                    {
                        OnFolderChanged();
                    }

                    GUILayout.FlexibleSpace();

                    if (GUILayout.Button("Open current folder in explorer"))
                    {
                        Utils.OpenDirInExplorer(_folderTreeView.CurrentFolder);
                    }
                    if (GUILayout.Button("Open screenshot folder in explorer"))
                    {
                        Utils.OpenDirInExplorer(Path.Combine(Utils.NormalizePath(UserData.Path), "cap"));
                    }
                    if (GUILayout.Button("Open character folder in explorer"))
                    {
                        Utils.OpenDirInExplorer(Path.Combine(Utils.NormalizePath(UserData.Path), "chara"));
                    }
                    if (GUILayout.Button("Open main game folder in explorer"))
                    {
                        Utils.OpenDirInExplorer(Path.GetDirectoryName(Utils.NormalizePath(UserData.Path)));
                    }
                }
                GUILayout.EndVertical();
            }
            GUILayout.EndHorizontal();
        }