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);
|
||||
port.Add(propertyFieldContainer);
|
||||
}
|
||||
|
@ -53,11 +53,33 @@ namespace ImageProcessingGraph.Editor
|
||||
|
||||
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);
|
||||
|
||||
background.SendToBack();
|
||||
|
||||
|
||||
|
||||
|
||||
this.AddManipulator(new ContentDragger());
|
||||
this.AddManipulator(new SelectionDragger());
|
||||
this.AddManipulator(new RectangleSelector());
|
||||
|
Loading…
x
Reference in New Issue
Block a user