Exemplo n.º 1
0
 public static GraphSaveUtility GetInstance(StoryGraphView graphView)
 {
     return(new GraphSaveUtility
     {
         _graphView = graphView
     });
 }
Exemplo n.º 2
0
 private void ConstructGraphView()
 {
     _graphView = new StoryGraphView(this)
     {
         name = "Narrative Graph",
     };
     _graphView.StretchToParentSize();
     rootVisualElement.Add(_graphView);
 }
Exemplo n.º 3
0
 private void ConstructGraphView()
 {
     _graphView = new StoryGraphView
     {
         name = _filePath != null?Path.GetFileName(_filePath) : "Unsaved New Narrative"
     };
     _graphView.StretchToParentSize();
     rootVisualElement.Add(_graphView);
 }
        public void Configure(EditorWindow window, StoryGraphView graphView)
        {
            _window    = window;
            _graphView = graphView;

            //Transparent 1px indentation icon as a hack
            _indentationIcon = new Texture2D(1, 1);
            _indentationIcon.SetPixel(0, 0, new Color(0, 0, 0, 0));
            _indentationIcon.Apply();
        }
Exemplo n.º 5
0
        private void CreateNew()
        {
            var loadFilePath = EditorUtility.SaveFilePanelInProject("Create Narrative", "New narrative", "asset", "");

            var saveUtility = GraphSaveUtility.GetInstance(_graphView);

            _graphView = new StoryGraphView
            {
                name = "Narrative Graph"
            };
            _filePath = loadFilePath;
            UpdateTitle();
        }