multi in/out
This commit is contained in:
parent
b7be961b5f
commit
cac48dd659
@ -5,9 +5,15 @@ using UnityEngine.UIElements;
|
|||||||
namespace AsmdefGraph.Editor {
|
namespace AsmdefGraph.Editor {
|
||||||
public class AsmdefGraphView : GraphView {
|
public class AsmdefGraphView : GraphView {
|
||||||
public AsmdefGraphView() : base() {
|
public AsmdefGraphView() : base() {
|
||||||
AddElement(new AsmdefNode());
|
// zoom可能に
|
||||||
AddElement(new AsmdefNode());
|
SetupZoom(ContentZoomer.DefaultMinScale, ContentZoomer.DefaultMaxScale);
|
||||||
|
// 背景を黒に
|
||||||
|
Insert(0, new GridBackground());
|
||||||
|
// ドラッグによる移動可能に
|
||||||
this.AddManipulator(new SelectionDragger());
|
this.AddManipulator(new SelectionDragger());
|
||||||
|
AddElement(new AsmdefNode());
|
||||||
|
AddElement(new AsmdefNode());
|
||||||
|
AddElement(new AsmdefNode());
|
||||||
}
|
}
|
||||||
|
|
||||||
public override List<Port> GetCompatiblePorts(Port startAnchor, NodeAdapter nodeAdapter) {
|
public override List<Port> GetCompatiblePorts(Port startAnchor, NodeAdapter nodeAdapter) {
|
||||||
|
@ -5,10 +5,12 @@ namespace AsmdefGraph.Editor {
|
|||||||
public AsmdefNode() {
|
public AsmdefNode() {
|
||||||
title = "AsmdefNode";
|
title = "AsmdefNode";
|
||||||
|
|
||||||
var inputPort = Port.Create<Edge>(Orientation.Horizontal, Direction.Input, Port.Capacity.Single, typeof(Port));
|
var inputPort = Port.Create<Edge>(Orientation.Horizontal, Direction.Input, Port.Capacity.Multi, typeof(Port));
|
||||||
|
inputPort.portName = "In";
|
||||||
inputContainer.Add(inputPort);
|
inputContainer.Add(inputPort);
|
||||||
|
|
||||||
var outputPort = Port.Create<Edge>(Orientation.Horizontal, Direction.Output, Port.Capacity.Single, typeof(Port));
|
var outputPort = Port.Create<Edge>(Orientation.Horizontal, Direction.Output, Port.Capacity.Multi, typeof(Port));
|
||||||
|
outputPort.portName = "Out";
|
||||||
outputContainer.Add(outputPort);
|
outputContainer.Add(outputPort);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user