|
|
|
|
|
|
inputNodeAnchorPresenter.anchorType = typeof(Color); |
|
|
|
nodePresenter.inputAnchors.Add(inputNodeAnchorPresenter); |
|
|
|
|
|
|
|
var outputNodeAnchorPresenter = CreateInstance<OutputNodeAnchorPresenter>(); |
|
|
|
outputNodeAnchorPresenter.anchorType = outputType; |
|
|
|
nodePresenter.outputAnchors.Add(outputNodeAnchorPresenter); |
|
|
|
if (outputType != null) |
|
|
|
{ |
|
|
|
var outputNodeAnchorPresenter = CreateInstance<OutputNodeAnchorPresenter>(); |
|
|
|
outputNodeAnchorPresenter.anchorType = outputType; |
|
|
|
nodePresenter.outputAnchors.Add(outputNodeAnchorPresenter); |
|
|
|
} |
|
|
|
|
|
|
|
return nodePresenter; |
|
|
|
} |
|
|
|
|
|
|
// This is a demo, so our data (and thus our presenters) is fixed.
|
|
|
|
|
|
|
|
var containerPresenter = CreateInstance<InvisibleBorderContainerPresenter>(); |
|
|
|
containerPresenter.position = new Rect(630.0f, 0.0f, 200.0f, 200.0f); |
|
|
|
containerPresenter.position = new Rect(850, 320, 200, 200); |
|
|
|
containerPresenter.position = new Rect(630.0f, 210.0f, 200.0f, 200.0f); |
|
|
|
containerPresenter.position = new Rect(1070, 320, 200, 200); |
|
|
|
circlePresenter.position = new Rect(630, 420, 0, 0); |
|
|
|
circlePresenter.position = new Rect(630, 320, 0, 0); |
|
|
|
circlePresenter.radius = 200; |
|
|
|
AddElement(circlePresenter); |
|
|
|
|
|
|
|
|
|
|
nodePresenter = InitNodePresenter(typeof(float)); |
|
|
|
nodePresenter.position = new Rect(0, 186, 200, 176); |
|
|
|
nodePresenter.title = "Another Operator"; |
|
|
|
AddElement(nodePresenter); |
|
|
|
|
|
|
|
nodePresenter = InitNodePresenter(null); |
|
|
|
nodePresenter.position = new Rect(600, 0, 200, 176); |
|
|
|
nodePresenter.title = "No Output"; |
|
|
|
AddElement(nodePresenter); |
|
|
|
|
|
|
|
var verticalNodePresenter = InitVerticalNodePresenter(); |
|
|
|