﻿using UnityEditor;
using UnityEditor.Experimental.GraphView;
using UnityEngine.UIElements;

namespace JLGames.RocketDriver.Editor.Windows.Main.Workflow
{
    public class WorkflowContent : GraphView
    {
        public new class UxmlFactory : UxmlFactory<WorkflowContent, UxmlTraits>
        {
        }

        public WorkflowContent()
        {
            Insert(0, new GridBackground());

            this.AddManipulator(new ContentZoomer());
            this.AddManipulator(new ContentDragger());
            this.AddManipulator(new SelectionDragger());
            this.AddManipulator(new RectangleSelector());
            
            var styleSheet = AssetDatabase.LoadAssetAtPath<StyleSheet>(MainEditorConfig.MainEditorUss);
            styleSheets.Add(styleSheet);
        }
    }
}