changed way that the the new menu is generated. Added category name to proxies
This commit is contained in:
@@ -16,6 +16,9 @@ namespace FlaxEditor.Content
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Animation Graph Function";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Animation";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||
{
|
||||
|
||||
@@ -15,6 +15,9 @@ namespace FlaxEditor.Content
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Animation Graph";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Animation";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||
|
||||
@@ -18,6 +18,9 @@ namespace FlaxEditor.Content
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Animation";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Animation";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool CanReimport(ContentItem item)
|
||||
|
||||
@@ -22,6 +22,11 @@ namespace FlaxEditor.Content
|
||||
/// </summary>
|
||||
public abstract string TypeName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The category name used to sort in context menus
|
||||
/// </summary>
|
||||
public abstract string CategoryName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Checks if this proxy supports the given asset type id at the given path.
|
||||
/// </summary>
|
||||
|
||||
@@ -62,6 +62,9 @@ namespace FlaxEditor.Content
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Audio Clip";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Audio";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool CanReimport(ContentItem item)
|
||||
|
||||
@@ -42,6 +42,9 @@ namespace FlaxEditor.Content
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Collision Data";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Physics";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||
|
||||
@@ -20,6 +20,9 @@ namespace FlaxEditor.Content
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Cube Texture";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Texture";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool CanReimport(ContentItem item)
|
||||
|
||||
@@ -17,6 +17,9 @@ namespace FlaxEditor.Content
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Font";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Font";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool CanReimport(ContentItem item)
|
||||
|
||||
@@ -15,6 +15,9 @@ namespace FlaxEditor.Content
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Gameplay Globals";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Globals";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||
|
||||
@@ -20,6 +20,9 @@ namespace FlaxEditor.Content
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => "IES Profile";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Lighting";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool CanReimport(ContentItem item)
|
||||
|
||||
@@ -31,6 +31,9 @@ namespace FlaxEditor.Content
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Json Asset";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Json Asset";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string FileExtension => Extension;
|
||||
@@ -165,6 +168,20 @@ namespace FlaxEditor.Content
|
||||
/// <inheritdoc />
|
||||
public override string Name { get; } = Utilities.Utils.GetPropertyNameUI(typeof(T).Name);
|
||||
|
||||
private string _categoryName;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => _categoryName;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the category name
|
||||
/// </summary>
|
||||
/// <param name="name">This is the category name</param>
|
||||
public void SetCategoryName(string name)
|
||||
{
|
||||
_categoryName = name;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool CanCreate(ContentFolder targetLocation)
|
||||
{
|
||||
|
||||
@@ -15,6 +15,9 @@ namespace FlaxEditor.Content
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Material Function";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Material";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||
|
||||
@@ -20,6 +20,9 @@ namespace FlaxEditor.Content
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Material Instance";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Material";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||
|
||||
@@ -21,6 +21,9 @@ namespace FlaxEditor.Content
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Material";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Material";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||
|
||||
@@ -21,6 +21,9 @@ namespace FlaxEditor.Content
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Model";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Model";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool CanReimport(ContentItem item)
|
||||
|
||||
@@ -15,6 +15,9 @@ namespace FlaxEditor.Content
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Particle Emitter Function";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Particles";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||
|
||||
@@ -22,6 +22,9 @@ namespace FlaxEditor.Content
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Particle Emitter";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Particles";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||
|
||||
@@ -46,6 +46,9 @@ namespace FlaxEditor.Content
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Particle System";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Particles";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||
|
||||
@@ -31,6 +31,9 @@ namespace FlaxEditor.Content
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Prefab";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Prefab";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string FileExtension => Extension;
|
||||
|
||||
@@ -15,6 +15,9 @@ namespace FlaxEditor.Content
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Previews Cache";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Previews Cache";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||
|
||||
@@ -40,6 +40,9 @@ namespace FlaxEditor.Content
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Scene Animation";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Animation";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||
|
||||
@@ -19,6 +19,9 @@ namespace FlaxEditor.Content
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Scene";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Scene";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string FileExtension => Extension;
|
||||
|
||||
@@ -20,6 +20,9 @@ namespace FlaxEditor.Content
|
||||
/// Gets the settings type.
|
||||
/// </summary>
|
||||
public Type Type => _type;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Settings";
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="SettingsProxy"/> class.
|
||||
|
||||
@@ -14,6 +14,9 @@ namespace FlaxEditor.Content
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Shader";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Shader";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool CanReimport(ContentItem item)
|
||||
|
||||
@@ -15,6 +15,9 @@ namespace FlaxEditor.Content
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Skeleton Mask";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Animation";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||
|
||||
@@ -20,6 +20,9 @@ namespace FlaxEditor.Content
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Skinned Model";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Model";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool CanReimport(ContentItem item)
|
||||
|
||||
@@ -20,6 +20,9 @@ namespace FlaxEditor.Content
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Sprite Atlas";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Sprites";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool CanReimport(ContentItem item)
|
||||
|
||||
@@ -20,6 +20,9 @@ namespace FlaxEditor.Content
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Texture";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Texture";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool CanReimport(ContentItem item)
|
||||
|
||||
@@ -24,6 +24,9 @@ namespace FlaxEditor.Content
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string Name => "Visual Script";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string CategoryName => "Scripting";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override EditorWindow Open(Editor editor, ContentItem item)
|
||||
|
||||
Reference in New Issue
Block a user