Added Run button
This commit is contained in:
parent
462bf4ffc0
commit
4985cf5748
@ -200,7 +200,6 @@ namespace ImageProcessingGraph.Editor.Unity_Image_Processing.Scripts.Editor.Wind
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
propertyFieldContainer.Add(propertyField);
|
propertyFieldContainer.Add(propertyField);
|
||||||
port.Add(propertyFieldContainer);
|
port.Add(propertyFieldContainer);
|
||||||
}
|
}
|
||||||
|
@ -52,12 +52,34 @@ namespace ImageProcessingGraph.Editor
|
|||||||
GridBackground background = new GridBackground();
|
GridBackground background = new GridBackground();
|
||||||
|
|
||||||
background.name = "Grid";
|
background.name = "Grid";
|
||||||
|
|
||||||
|
Button runButton = new Button();
|
||||||
|
runButton.text = "Run";
|
||||||
|
|
||||||
|
// Set the size of the button (width and height)
|
||||||
|
runButton.style.width = 100; // Width in pixels
|
||||||
|
runButton.style.height = 40; // Height in pixels
|
||||||
|
|
||||||
|
// Position the button at the top-left corner
|
||||||
|
runButton.style.position = Position.Absolute; // Make sure it's positioned absolutely
|
||||||
|
runButton.style.top = 10; // Top 10 pixels from the top
|
||||||
|
runButton.style.left = 10; // Left 10 pixels from the left edge
|
||||||
|
|
||||||
|
// On click, execute the function
|
||||||
|
runButton.clicked += () =>
|
||||||
|
{
|
||||||
|
asset.RunGraph();
|
||||||
|
};
|
||||||
|
|
||||||
|
// Add the button to the UI
|
||||||
|
Add(runButton);
|
||||||
|
|
||||||
Add(background);
|
Add(background);
|
||||||
|
|
||||||
background.SendToBack();
|
background.SendToBack();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.AddManipulator(new ContentDragger());
|
this.AddManipulator(new ContentDragger());
|
||||||
this.AddManipulator(new SelectionDragger());
|
this.AddManipulator(new SelectionDragger());
|
||||||
this.AddManipulator(new RectangleSelector());
|
this.AddManipulator(new RectangleSelector());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user