/// <summary> /// Handle the user attempting to remove a connection. /// </summary> /// <param name="connection">The connection to remove.</param> private void OnRemoveConnection(NodeGraphWindowBaseConnection connection) { // Delete the asset, but allow it to be undone. mCachedDialogAsset.RemoveConnection_Editor(connection.associatedConnection); // Rebuild our graph form the character because this might've caused other effects. InitializeFromCharacter(); }
/// <summary> /// Draw this node on the graph. /// </summary> public void Draw() { if (mInConnectionMode) { NodeGraphWindowBaseConnection.DrawLine(associatedNode.rect.center, Event.current.mousePosition); } GUI.SetNextControlName(associatedNode.GetInstanceID().ToString()); // TODO: Why doesn't focusing work anymore? GUIStyle styleCopy = new GUIStyle(mMasterStyle); if (Selection.activeObject == associatedNode) { styleCopy.normal = mMasterStyle.focused; } GUI.Box(associatedNode.rectWithDrag, associatedNode.name, styleCopy); }