changed to use attribute to add items to the content context menu, this also allows users to add their own items to the CM

This commit is contained in:
Chandler Cox
2022-11-02 17:57:40 -05:00
parent 050635b2cd
commit a1e4400994
35 changed files with 109 additions and 152 deletions

View File

@@ -0,0 +1,26 @@
using System;
namespace FlaxEngine
{
/// <summary>
/// This attribute is used to show content items that can be created in the content browser context menu. Separate the subcontext menus with a /.
/// </summary>
[Serializable]
[AttributeUsage(AttributeTargets.Class)]
public class ContentContextMenuAttribute : Attribute
{
/// <summary>
/// The path to be used in the context menu
/// </summary>
public string Path;
/// <summary>
/// Initializes a new instance of the <see cref="ContentContextMenuAttribute"/> class.
/// </summary>
/// <param name="path">The path to use to create the context menu</param>
public ContentContextMenuAttribute(string path)
{
Path = path;
}
}
}