mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
Initial commit
This commit is contained in:
commit
3c7cc0c973
8391 changed files with 704313 additions and 0 deletions
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityEditor.Timeline
|
||||
{
|
||||
/// <summary>
|
||||
/// Used to indicate path and priority of classes that are auto added to the menu
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
internal class MenuEntryAttribute : Attribute
|
||||
{
|
||||
public readonly int priority;
|
||||
public readonly string name;
|
||||
public readonly string subMenuPath;
|
||||
|
||||
public MenuEntryAttribute(string path, int priority)
|
||||
{
|
||||
path = path ?? string.Empty;
|
||||
path = L10n.Tr(path);
|
||||
this.priority = priority;
|
||||
|
||||
int index = path.LastIndexOf('/');
|
||||
if (index >= 0)
|
||||
{
|
||||
name = (index == path.Length - 1) ? string.Empty : path.Substring(index + 1);
|
||||
subMenuPath = path.Substring(0, index + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
name = path;
|
||||
subMenuPath = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue