Exemplo n.º 1
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();
    }
        private void btnUpdate_Click(object sender, EventArgs e)
        {
            if(SelectedIndex != -1)
            {
                LicenseEditor editor = new LicenseEditor(SelectedItemTag as License);

                if (DialogResult.OK == editor.ShowDialog())
                    RefreshListItems();
            }
        }
        private void btnAdd_Click(object sender, EventArgs e)
        {
            LicenseEditor editor = new LicenseEditor();

            if (DialogResult.OK == editor.ShowDialog())
                RefreshListItems();
        }
Exemplo n.º 4
0
    static void Init()
    {
        LicenseEditor window = (LicenseEditor)EditorWindow.GetWindow(typeof(LicenseEditor));

        window.Show();
    }