예제 #1
0
        static void Init()
        {
            ZNodeEditor window = (ZNodeEditor)EditorWindow.GetWindow <ZNodeEditor> ("ZNodeEditor", true, typeof(SceneView));

            window.Show();

            window.Initialize();
        }
예제 #2
0
        public ZNodeTree(ZNodeEditor editor)
        {
            _nodeEditor    = editor;
            _name          = "New Tree";
            _filePath      = "";
            _nodes         = new List <ZNode>();
            _selectedNodes = new List <ZNode>();
            _connections   = new List <ZNodeConnection>();

            CreateRoot(_nodeEditor.SkinItem.rootPositionX, _nodeEditor.SkinItem.rootPositionY);
        }
예제 #3
0
        public ZNodeConnection(ZNodeEditor editor, ZNodeConnector inConnector, ZNodeConnector outConnector, System.Action <ZNodeConnection> RemoveConnectionFunc)
        {
            _editor               = editor;
            _inConnector          = inConnector;
            _outConnector         = outConnector;
            _removeConnectionFunc = RemoveConnectionFunc;

            _style = new GUIStyle();
            _style.normal.background = EditorGUIUtility.Load("builtin skins/darkskin/images/btn left.png") as Texture2D;
            _style.active.background = EditorGUIUtility.Load("builtin skins/darkskin/images/btn left on.png") as Texture2D;
            _style.border            = new RectOffset(4, 4, 12, 12);
        }
예제 #4
0
        public ZNodeInspector(ZNodeEditor editor)
        {
            _editor = editor;

            _editor.OnNodeSelected += OnNodeSelected;

            _titleStyle           = new GUIStyle("WhiteLabel");
            _titleStyle.alignment = TextAnchor.MiddleCenter;
            _titleStyle.fontStyle = FontStyle.Bold;

            _textStyle           = new GUIStyle("WhiteLabel");
            _textStyle.alignment = TextAnchor.MiddleLeft;
            _textStyle.fontStyle = FontStyle.Normal;
        }
예제 #5
0
        public ZNodeCreator(ZNodeEditor editor)
        {
            _editor = editor;

            _editor.OnNodeSelected += OnNodeSelected;

            _titleStyle           = new GUIStyle("WhiteLabel");
            _titleStyle.alignment = TextAnchor.MiddleCenter;
            _titleStyle.fontStyle = FontStyle.Bold;

            _textStyle           = new GUIStyle("WhiteLabel");
            _textStyle.alignment = TextAnchor.MiddleLeft;
            _textStyle.fontStyle = FontStyle.Normal;

            _searchStyle  = ZEditorUtils.CreateGUIStyle(_editor.SkinItem.searchIcon);
            _searchString = "";

            _compositeNodeList = (ZNodeComposite.NODE_TYPE[])System.Enum.GetValues(typeof(ZNodeComposite.NODE_TYPE));
            _decoratorNodeList = (ZNodeDecorator.NODE_TYPE[])System.Enum.GetValues(typeof(ZNodeDecorator.NODE_TYPE));
            _actionNodeList    = (ZBTActionManager.NODE_TYPE[])System.Enum.GetValues(typeof(ZBTActionManager.NODE_TYPE));
        }