This commit is contained in:
2021-06-13 10:28:03 +02:00
parent eb70603c85
commit df2d24cbd3
7487 changed files with 943244 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
using UnityEditor.ShortcutManagement;
using UnityEngine;
namespace UnityEditor.Timeline.Actions
{
/// <summary>
/// Use this attribute to make an action work with the shortcut system.
/// </summary>
/// <example>
/// TimelineShortcutAttribute needs to be added to a static method.
/// <code source="../../DocCodeExamples/TimelineAttributesExamples.cs" region="declare-timelineShortcutAttr" title="TimelineShortcutAttr"/>
/// </example>
public class TimelineShortcutAttribute : ShortcutManagement.ShortcutAttribute
{
/// <summary>
/// TimelineShortcutAttribute Constructor
/// </summary>
/// <param name="id">Id to register the shortcut. It will automatically be prefix by 'Timeline/' in order to be in the 'Timeline' section of the shortcut manager.</param>
/// <param name="defaultKeyCode">Optional key code for default binding.</param>
/// <param name="defaultShortcutModifiers">Optional shortcut modifiers for default binding.</param>
public TimelineShortcutAttribute(string id, KeyCode defaultKeyCode, ShortcutModifiers defaultShortcutModifiers = ShortcutModifiers.None)
: base("Timeline/" + id, typeof(TimelineWindow), defaultKeyCode, defaultShortcutModifiers) {}
}
}