예제 #1
0
 public StartNodeElement()
 {
     _nodeNameLabel = new NodeNameLabel("Start From Here", 140);
     _rect          = _rect = new Rect(0, 0, _nodeNameLabel.Width + EditorConstants.NodePadding * 2, _nodeNameLabel.Height + EditorConstants.NodePadding * 3);
     _defaultStyle  = EditorConstants.GetNodeStyle();
     _selectedStyle = EditorConstants.GetSelectedNodeStyle();
 }
예제 #2
0
 public NodeElement(NodeContent content, Action removeNode)
 {
     _content          = content;
     _contentSize      = new Vector2(0, 0);
     _rect             = new Rect(0, 0, 0, 0);
     _nodeNameLabel    = new NodeNameLabel(_content.Name, _content.Width - EditorConstants.NodePadding * 2);
     _removeNodeButton = new TextButton("X", removeNode, EditorConstants.ButtonHeight);
     UpdateDimensions();
     _defaultStyle  = EditorConstants.GetNodeStyle();
     _selectedStyle = EditorConstants.GetSelectedNodeStyle();
 }