public NodeEditorNodes(EditorWindow _editorWindow, NodeConfig _nodeConfig, ConstellationScript _constellationScript, IUndoable _undoable, NodeEditorSelection _nodeEditorSelection, ILinkEditor _linkEditor, IGUI _gui, IVisibleObject _visibleObject, NodeAdded _nodeAdded, NodeRemoved _nodeRemoved, HelpClicked _helpClicked) { linkEditor = _linkEditor; editorWindow = _editorWindow; Nodes = new List <NodeView> (); nodeConfig = _nodeConfig; constellationScript = _constellationScript; isInstance = constellationScript.IsInstance; nodesFactory = new NodesFactory(); undoable = _undoable; nodeEditorSelection = _nodeEditorSelection; GUI = _gui; visibleObject = _visibleObject; OnNodeAdded += _nodeAdded; OnNodeRemoved += _nodeRemoved; OnHelpClicked += _helpClicked; SetNodes(); }
public LinkView(IGUI _gui, NodeEditorPanel _editor, ConstellationScript _constellationScript, NodeConfig _nodeConfig, LinkRemoved _onLinkRemoved) { constellationScript = _constellationScript; editor = _editor; nodeConfig = _nodeConfig; OnLinkRemoved += _onLinkRemoved; }
public NodeEditorLinks(ConstellationScript _constellationScript, bool _isInstance, IGUI _gui, NodeConfig _nodeConfig, LinkAdded _onLinkAdded, LinkRemoved _onLinkRemoved, NodeEditorPanel _nodeEditorPannel, IUndoable _undoable) { OnLinkAdded += _onLinkAdded; OnLinkRemoved += _onLinkRemoved; undoable = _undoable; constellationScript = _constellationScript; isInstance = _isInstance; GUI = _gui; LinksView = new LinkView(GUI, _nodeEditorPannel, constellationScript, _nodeConfig, linkRemoved); }
public NodeView(NodeData _node, NodeEditorPanel _editor, NodeConfig _nodeConfig, ConstellationScript _constellation) { nodeConfig = _nodeConfig; var nodeWidth = nodeConfig.NodeWidth; if (_node.GetAttributes().Length > 0) { nodeWidth = nodeConfig.NodeWidthAsAttributes; } Rect = new Rect(_node.XPosition, _node.YPosition, nodeWidth, (Mathf.Max(Mathf.Max(_node.Inputs.Count, _node.Outputs.Count), _node.AttributesData.Count) * nodeConfig.InputSize) + nodeConfig.TopMargin); node = _node; editor = _editor; constellationScript = _constellation; foreach (var attribute in node.AttributesData) { attribute.Value = AttributeStyleFactory.Reset(attribute.Type, attribute.Value); } }
void Setup() { nodeConfig = new NodeConfig(); LoadConstellation(); isSetupRequested = false; }
void Setup() { nodeConfig = new NodeConfig(); LoadConstellation(); LinksView = new LinkView(GUI, this, constellationScript, nodeConfig); }
public LinkView(IGUI _gui, NodeEditorPanel _editor, ConstellationScript _constellationScript, NodeConfig _nodeConfig) { constellationScript = _constellationScript; editor = _editor; nodeConfig = _nodeConfig; }
public LinkView(IGUI _gui, ConstellationScript _constellationScript, NodeConfig _nodeConfig) { constellationScript = _constellationScript; nodeConfig = _nodeConfig; }