Esempio n. 1
0
    public static void Toggle(UnityPathSelectionInfo selector)
    {
        Debug.Log("Test>:" + selector.GetAbsolutePath(true));
        DocumentationDirectoryStream tmp = new DocumentationDirectoryStream(selector.GetAbsolutePath(true));

        if (tmp.Exist())
        {
            tmp.ToggleVisiblity();
        }
    }
Esempio n. 2
0
    void OnGUI()
    {
        if (GUILayout.Button("Lock Selection: " + m_lockState))
        {
            m_lockState = !m_lockState;
        }
        if (!Directory.Exists(m_selector.GetAbsolutePath(true)))
        {
            m_lockState = false;
        }

        if (!m_lockState)
        {
            UnityPathSelectionInfo.Get(out m_pathFound, out m_selector);
        }
        string previous = m_info.m_focusPath;

        m_info.m_focusPath = m_selector.GetAbsolutePath(true);
        if (previous != m_info.m_focusPath)
        {
            RefreshAccess();
        }


        EditorGUILayout.TextField(m_selector.GetRelativePath(true));
        EditorGUILayout.TextField(m_selector.GetAbsolutePath(true));

        m_info.m_scollrPackagePosition = GUILayout.BeginScrollView(m_info.m_scollrPackagePosition);
        GUILayout.Label("Welcome", EditorStyles.boldLabel);
        GUILayout.Label("This window allow you to read write config package.");
        GUILayout.Space(10);

        m_info.m_hideHiddenTool = EditorGUILayout.Foldout(m_info.m_hideHiddenTool, m_info.m_hideHiddenTool ? "→ Doc & Sample" : "↓ Doc & Sample", EditorStyles.boldLabel);
        if (!m_info.m_hideHiddenTool)
        {
            ToggleAndCreateHiddenFolder();
        }

        ReadMeEditor.DrawEditorDefaultInterface(m_info.m_readMe, ref m_info.m_gitLink, ref m_info.m_tmpReadMeText, ref m_info.m_tmpReadMeHide);

        ChangeLogEditor.DrawEditorDefaultInterface(m_info.m_changelog, ref m_info.m_tmpLogVersion, ref m_info.m_tmpLogTitle, ref m_info.m_tmpLogNew, ref m_info.m_tmpLogHide);

        LicenseEditor.DrawEditorDefaultInterface(m_info.m_license, ref m_info.m_tmpLicenseLink, ref m_info.m_tmpLicenseText, ref m_info.tmpLicenseHide);



        //CreatePackageDirectories();
        GUILayout.EndScrollView();
    }
Esempio n. 3
0
    public static void Toggle(UnityPathSelectionInfo selector)
    {
        SampleDirectoryStream tmp = new SampleDirectoryStream(selector.GetAbsolutePath(true));

        if (tmp.Exist())
        {
            tmp.ToggleVisiblity();
        }
    }
    public static void GetAffectedGit(UnityPathSelectionInfo selector, out GitLinkOnDisk gitAffected)
    {
        string path = selector.GetAbsolutePath(true);

        if (QuickGit.IsPathHasGitRootFolder(path))
        {
            gitAffected = new  GitLinkOnDisk(path);
        }
        QuickGit.GetGitInParents(path, QuickGit.PathReadDirection.LeafToRoot, out gitAffected);
    }
    void OnGUI()
    {
        UnityPathSelectionInfo.Get(out m_pathFound, out m_selector);
        GUILayout.Label("Package.json: " + m_selector.GetRelativePath(false), EditorStyles.boldLabel);
        PackageJsonFileStream f = PackageJsonUtility.GetPackageFile(m_selector);

        QuickGit.GetGitInParents(m_selector.GetAbsolutePath(false), QuickGit.PathReadDirection.LeafToRoot,
                                 out m_gitLink);
        DrawEditorDefaultInterface(m_selector, f, ref m_builder, ref m_jsonProposition, ref m_raw, ref m_hide);
    }
Esempio n. 6
0
    void OnGUI()
    {
        UnityPathSelectionInfo.Get(out m_pathFound, out m_selector);
        GUILayout.Label("Read Me: " + m_selector.GetRelativePath(false), EditorStyles.boldLabel);
        ReadMeFileStream f = ReadMeUtility.GetReadMeFile(m_selector);

        QuickGit.GetGitInParents(m_selector.GetAbsolutePath(false), QuickGit.PathReadDirection.LeafToRoot, out m_gitLink);

        //QuickGit.GetGitInDirectory(m_selector.GetAbsolutePath(false), out m_gitLink, true);
        DrawEditorDefaultInterface(f, ref m_gitLink, ref m_text, ref m_hide);
    }
    public static void ProposeCloneProject(UnityPathSelectionInfo selector, ref string cloneProposed)
    {
        GUILayout.BeginHorizontal();
        if (GUILayout.Button("Clone"))
        {
            QuickGit.Clone(cloneProposed, selector.GetAbsolutePath(true));
        }
        cloneProposed = GUILayout.TextField(
            cloneProposed);


        GUILayout.EndHorizontal();
    }
    public static void ProposeToCreateFolder(UnityPathSelectionInfo selector, ref string folderName)
    {
        GUILayout.BeginHorizontal();
        if (GUILayout.Button("Create folder:", GUILayout.Width(120)))
        {
            if (!string.IsNullOrEmpty(folderName))
            {
                string full     = selector.GetAbsolutePath(true);
                string relative = selector.GetRelativePath(true);
                if (Directory.Exists(full))
                {
                    Directory.CreateDirectory(full + "/" + folderName);
                    RefreshDatabase();

                    Ping.PingFolder(relative + "/" + folderName, false);
                }
            }
        }
        folderName = GUILayout.TextField(folderName);
        GUILayout.EndHorizontal();
        DisplayMessageToHelp("Please select or create a empty folder");
    }
 void OnGUI()
 {
     UnityPathSelectionInfo.Get(out m_pathFound, out m_selector);
     GUILayout.Label("Focus: " + m_selector.GetRelativePath(false), EditorStyles.boldLabel);
     DrawEditorDefaultInterface(new ChangeLogFileStream(m_selector.GetAbsolutePath(false)), ref m_version, ref m_title, ref m_logs, ref m_hide);
 }
Esempio n. 10
0
 public static PackageJsonFileStream GetPackageFile(UnityPathSelectionInfo selector)
 {
     return(new PackageJsonFileStream(selector.GetAbsolutePath(true)));
 }
 public static LicenseFileStream GetReadMeFile(UnityPathSelectionInfo m_selector)
 {
     return(new LicenseFileStream(m_selector.GetAbsolutePath(true), ".md"));
 }
Esempio n. 12
0
 public static SampleDirectoryStream GetSampleFolder(UnityPathSelectionInfo selector)
 {
     return(new SampleDirectoryStream(selector.GetAbsolutePath(true)));
 }
Esempio n. 13
0
    public static void Create(UnityPathSelectionInfo selector, bool asHidden)
    {
        SampleDirectoryStream tmp = new SampleDirectoryStream(selector.GetAbsolutePath(true));

        tmp.Create(asHidden);
    }
Esempio n. 14
0
 public static DocumentationDirectoryStream GetDocumentFolder(UnityPathSelectionInfo selector)
 {
     return(new DocumentationDirectoryStream(selector.GetAbsolutePath(true)));
 }
Esempio n. 15
0
 void OnGUI()
 {
     UnityPathSelectionInfo.Get(out m_pathFound, out m_selector);
     DrawEditorDefaultInterface(new LicenseFileStream(m_selector.GetAbsolutePath(false)), ref m_licenseLink, ref m_licenseText, ref m_hide);
 }