Example #1
0
        public BaseStackNodeView AddStackNodeView(BaseStackNode stackNode)
        {
            var stackView = new BaseStackNodeView(stackNode);

            AddElement(stackView);
            stackNodeViews.Add(stackView);

            stackView.Initialize(this);

            return(stackView);
        }
        public BaseStackNodeView AddStackNodeView(BaseStackNode stackNode)
        {
            var viewType  = StackNodeViewProvider.GetStackNodeCustomViewType(stackNode.GetType()) ?? typeof(BaseStackNodeView);
            var stackView = Activator.CreateInstance(viewType, stackNode) as BaseStackNodeView;

            AddElement(stackView);
            stackNodeViews.Add(stackView);

            stackView.Initialize(this);

            return(stackView);
        }
 public BaseStackNodeView(BaseStackNode stackNode)
 {
     this.stackNode = stackNode;
     styleSheets.Add(Resources.Load <StyleSheet>(styleSheet));
     SetPosition(new Rect(stackNode.position, Vector2.zero));
 }
Example #4
0
 public BaseStackNodeView AddStackNode(BaseStackNode stackNode)
 {
     graph.AddStackNode(stackNode);
     return(AddStackNodeView(stackNode));
 }
 public BaseStackNodeView(BaseStackNode stackNode)
 {
     this.stackNode = stackNode;
     styleSheets.Add(Resources.Load <StyleSheet>(styleSheet));
 }