Exemple #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();
 }
Exemple #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();
 }