2025-04-26 20:40:13 +01:00

45 lines
1.1 KiB
C#

using System;
namespace ImageProcessingGraph.Editor.Nodes.NodeAttributes
{
[AttributeUsage(AttributeTargets.Class)]
public class NodeInfoAttribute : Attribute
{
private string name;
private string menuItem;
private string ussPath;
public string Title => name;
public string MenuItem => menuItem;
public string UssPath => ussPath;
public NodeInfoAttribute(string name, string menuItem = "", bool requiresImage = false, string ussPath = null)
{
this.name = name;
this.menuItem = menuItem;
this.ussPath = ussPath;
}
}
[AttributeUsage(AttributeTargets.Field)]
public class Input : Attribute
{
public string Label { get; }
public Input(string _label)
{
Label = _label;
}
}
[AttributeUsage(AttributeTargets.Field)]
public class Output : Attribute
{
public string Label { get; }
public Output(string _label)
{
Label = _label;
}
}
}