コード例 #1
0
    void DrawOpenNameList(List <string> names)
    {
        foreach (string n in names)
        {
            EditorGUILayout.BeginHorizontal();

            GUILayout.Label(n, GUILayout.Width(200.0f));
            GUILayout.Space(100.0f);

            if (GUILayout.Button("Edit", GUILayout.Width(180.0f)))
            {
                editing          = true;
                manager.editName = n;
            }

            if (GUILayout.Button("Save to file", GUILayout.Width(100.0f)))
            {
                var filer = new InspectorPlusFiler();
                filer.WriteToFile(n, manager.GetTracker(n), "InspectorPlusOutput/Editor");
                AssetDatabase.Refresh();
                EditorUtility.DisplayDialog("Inspector save to file", @"
Your inspector has been saved to " + n + @"InspectorPlus.cs. Feel free to distribute this file!",
                                            "Ok");
            }

            if (GUILayout.Button("Delete", GUILayout.Width(100.0f)))
            {
                manager.DeleteInspector(n);
                AssetDatabase.Refresh();
                Repaint();
            }

            EditorGUILayout.EndHorizontal();
        }
    }
コード例 #2
0
    void DrawOpenNameList(List <string> names)
    {
        foreach (string n in names)
        {
            EditorGUILayout.BeginHorizontal();

            GUILayout.Label(n, GUILayout.Width(200.0f));
            GUILayout.Space(100.0f);

            if (GUILayout.Button("Edit", GUILayout.Width(180.0f)))
            {
                editing          = true;
                manager.editName = n;
            }

            if (GUILayout.Button("Save to file", GUILayout.Width(100.0f)))
            {
                var filer = new InspectorPlusFiler();
                filer.WriteToFile(n, manager.GetTracker(n), "InspectorPlusOutput/Editor");
                AssetDatabase.Refresh();
                EditorUtility.DisplayDialog("Inspector save to file", @"
Your inspector has been saved to " + n + @"InspectorPlus.cs. Feel free to distribute this file! (Note that this file must be in a folder called Editor to activate)
	
To support Inspector++ a subtle watermark has been added. If you really disagree with this you are free to go in the .cs file and remove the watermark.", "Ok");
            }

            if (GUILayout.Button("Delete", GUILayout.Width(100.0f)))
            {
                manager.DeleteInspector(n);
                AssetDatabase.Refresh();
                Repaint();
            }

            EditorGUILayout.EndHorizontal();
        }
    }
コード例 #3
0
    void DrawOpenNameList(List<string> names)
    {
        foreach (string n in names)
        {
            EditorGUILayout.BeginHorizontal();

            GUILayout.Label(n, GUILayout.Width(200.0f));
            GUILayout.Space(100.0f);

            if (GUILayout.Button("Edit", GUILayout.Width(180.0f)))
            {
                editing = true;
                manager.editName = n;
            }

            if (GUILayout.Button("Save to file", GUILayout.Width(100.0f)))
            {
                var filer = new InspectorPlusFiler();
                filer.WriteToFile(n, manager.GetTracker(n), "InspectorPlusOutput/Editor");
                AssetDatabase.Refresh();
                EditorUtility.DisplayDialog("Inspector save to file", @"
Your inspector has been saved to " + n + @"InspectorPlus.cs. Feel free to distribute this file! (Note that this file must be in a folder called Editor to activate)
	
To support Inspector++ a subtle watermark has been added. If you really disagree with this you are free to go in the .cs file and remove the watermark.", "Ok");
            }

            if (GUILayout.Button("Delete", GUILayout.Width(100.0f)))
            {
                manager.DeleteInspector(n);
                AssetDatabase.Refresh();
                Repaint();
            }

            EditorGUILayout.EndHorizontal();
        }
    }