Beispiel #1
0
        // INITIALIZERS: --------------------------------------------------------------------------

        public static void Create(IDatabaseEditor editor)
        {
            if (WINDOWS == null)
            {
                WINDOWS = new Dictionary <string, PreferencesDetachWindow>();
            }
            if (WINDOWS.ContainsKey(editor.GetName()))
            {
                if (WINDOWS[editor.GetName()] != null)
                {
                    WINDOWS[editor.GetName()].Close();
                }

                WINDOWS.Remove(editor.GetName());
            }

            PreferencesDetachWindow window = EditorWindow.GetWindow <PreferencesDetachWindow>(
                editor.GetName(),
                true
                ) as PreferencesDetachWindow;

            WINDOWS.Add(editor.GetName(), window);
            window.editor = editor;
            window.Show();
        }
Beispiel #2
0
        // INITIALIZERS: --------------------------------------------------------------------------

        public static void Create(IDatabaseEditor editor)
        {
            if (WINDOWS == null)
            {
                WINDOWS = new Dictionary <string, PreferencesDetachWindow>();
            }
            if (WINDOWS.ContainsKey(editor.GetName()))
            {
                if (WINDOWS[editor.GetName()] != null)
                {
                    WINDOWS[editor.GetName()].Close();
                }

                WINDOWS.Remove(editor.GetName());
            }

            string name = editor.GetName();
            PreferencesDetachWindow window = CreateInstance <PreferencesDetachWindow>();

            window.titleContent = new GUIContent(name);

            WINDOWS.Add(name, window);
            window.editor = editor;
            window.Show();
            window.Focus();
        }
Beispiel #3
0
 public DatabaseInfo(IDatabase data)
 {
     this.data       = data;
     this.dataEditor = Editor.CreateEditor(this.data) as IDatabaseEditor;
     this.name       = this.dataEditor.GetName();
 }