public static void Init()
 {
     Instance = GetWindow <GraphCreatePopup>(true);
     Instance.titleContent = new GUIContent("Script Name");
     Instance.maxSize      = new Vector2(450, 80);
     Instance.minSize      = Instance.maxSize;
 }
        public override void DrawView(Rect editorRect, Rect PercentRect, Event e, NodeGraph graph)
        {
            base.DrawView(editorRect, PercentRect, e, graph);
            ProcessEvents(e);
            if (graph != null)
            {
                title = graph.name;
            }
            else
            {
                title = GetTitle();
            }

            try {
                GUI.Box(body, "", skin.GetStyle("HeaderViewBackground"));
                GUILayout.BeginArea(body);
                {
                    GUILayout.BeginHorizontal();
                    if (GUILayout.Button("New Script",
                                         skin.GetStyle("HeaderButton"),
                                         GUILayout.Width(80),
                                         GUILayout.Height(body.height)))
                    {
                        GraphCreatePopup.Init();
                    }
                    if (graph != null)
                    {
                        if (GUILayout.Button("Delete Script",
                                             skin.GetStyle("HeaderButton"),
                                             GUILayout.Width(80),
                                             GUILayout.Height(body.height)))
                        {
                            NodeUtilities.DeleteScript(graph);
                        }
                    }
                    GUILayout.EndHorizontal();
                }  GUILayout.EndArea();
            } catch { }
        }