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);
    }
예제 #2
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);
    }
예제 #3
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();
    }
    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);
 }