diff --git a/Editor/Scripts/Editor/Windows/ImageProcessingGraphNodeVisual.cs b/Editor/Scripts/Editor/Windows/ImageProcessingGraphNodeVisual.cs index 8f1b3a3..342a163 100644 --- a/Editor/Scripts/Editor/Windows/ImageProcessingGraphNodeVisual.cs +++ b/Editor/Scripts/Editor/Windows/ImageProcessingGraphNodeVisual.cs @@ -200,7 +200,6 @@ namespace ImageProcessingGraph.Editor.Unity_Image_Processing.Scripts.Editor.Wind }); } - propertyFieldContainer.Add(propertyField); port.Add(propertyFieldContainer); } diff --git a/Editor/Scripts/Editor/Windows/ImageProcessingGraphViewWindow.cs b/Editor/Scripts/Editor/Windows/ImageProcessingGraphViewWindow.cs index d194e57..fe897fe 100644 --- a/Editor/Scripts/Editor/Windows/ImageProcessingGraphViewWindow.cs +++ b/Editor/Scripts/Editor/Windows/ImageProcessingGraphViewWindow.cs @@ -52,12 +52,34 @@ namespace ImageProcessingGraph.Editor GridBackground background = new GridBackground(); 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());