void HandleNodeConnectorSelected(NodeGUIBase node, int connectorIndex, NodeGUIBase.NodeConnectorType connectorType) { switch( connectorType ) { case NodeGUIBase.NodeConnectorType.DATA_IN: m_cursorConnection.SetTo( node, connectorIndex ); break; case NodeGUIBase.NodeConnectorType.DATA_OUT: m_cursorConnection.SetFrom( node ); break; } switch( m_cursorConnection.State ) { case SynthGraphEditorGraphConnection.ConnectionState.NO_CONNECTED: SetRequiresContiniousUpdates( false ); break; case SynthGraphEditorGraphConnection.ConnectionState.CONNECTING: SetRequiresContiniousUpdates( true ); break; case SynthGraphEditorGraphConnection.ConnectionState.CONNECTED: SetRequiresContiniousUpdates( false ); if ( m_cursorConnection.m_to.AddConnection( m_cursorConnection ) ) { SetDirty( true ); } m_cursorConnection = new SynthGraphEditorGraphConnection(); break; } }
private void HandleNodeSelected( NodeGUIBase node ) { m_rootNode = node.DataNode; Log ( string.Format("{0} selected", node.ToString())); }
private static void RaiseNodeConnectorSelected( NodeGUIBase node, int connectorIndex, NodeConnectorType connectorType ) { if ( OnNodeConnectorSelected != null ) { OnNodeConnectorSelected( node, connectorIndex, connectorType ); } }
public void SetFrom( NodeGUIBase from ) { m_from = from; UpdateState(); }
public void Reset() { m_from = null; m_to = null; UpdateState(); }
public void SetTo( NodeGUIBase to, int slot ) { m_to = to; m_toSlot = slot; UpdateState(); }