Пример #1
0
    /*
     * Menu for vtk-filter tree
     * */
    public void FilterMenu()
    {
        EditorGUILayout.LabelField("Filters:");

        EditorGUILayout.Separator();

        //Options for the active node
        EditorGUILayout.BeginHorizontal();
        EditorGUILayout.LabelField("Selected node: " + script.activeNode.name);

        if (GUILayout.Button("Remove"))
        {
            script.RemoveNode(script.activeNode);
        }
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginHorizontal();
        script.selectedFilter = EditorGUILayout.Popup(script.selectedFilter, script.supportedFilters);

        if (GUILayout.Button("Add"))
        {
            script.AddNode(script.supportedFilters[script.selectedFilter]);
        }
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.Separator();

        //Tree
        CreateSubTree(script.rootNode, 0);
    }