private void ContextCallback(object obj)
        {
            switch (obj.ToString())
            {
            case "0":
                AG_CreateGraphWindow.InitNodePopup();
                break;

            case "1":
                LoadGraph();
                break;

            case "2":

                AG_Node beginNode = AG_Node.CreateNode(mousePosition, currentGraph, AG_NodeType.Begin);

                beginNode.nodeType = AG_NodeType.Begin;

                AssetDatabase.AddObjectToAsset(beginNode, currentGraph);
                AssetDatabase.SaveAssets();
                AssetDatabase.Refresh();

                currentGraph.nodes.Add(beginNode);

                break;



            case "3":

                AG_Node dialogueNode = AG_Node.CreateNode(mousePosition, currentGraph, AG_NodeType.Dialogue);

                dialogueNode.nodeType = AG_NodeType.Dialogue;

                AssetDatabase.AddObjectToAsset(dialogueNode, currentGraph);
                AssetDatabase.SaveAssets();
                AssetDatabase.Refresh();

                currentGraph.nodes.Add(dialogueNode);

                break;

            case "4":

                AG_Node testNode = AG_Node.CreateNode(mousePosition, currentGraph, AG_NodeType.Test);

                testNode.nodeType = AG_NodeType.Test;

                AssetDatabase.AddObjectToAsset(testNode, currentGraph);
                AssetDatabase.SaveAssets();
                AssetDatabase.Refresh();

                currentGraph.nodes.Add(testNode);

                break;
            }
        }
 public static void InitNodePopup()
 {
     currentPopupWindow = EditorWindow.GetWindow <AG_CreateGraphWindow>();
     currentPopupWindow.titleContent = new GUIContent("New chapter");
 }