Files
sbox-public/engine/Sandbox.Tools/Editor/ShortcutAttribute.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

37 lines
768 B
C#

using System;
namespace Editor;
[AttributeUsage( AttributeTargets.Method )]
public class ShortcutAttribute : Attribute
{
public ShortcutAttribute( string identifier, string keyBind, ShortcutType type = ShortcutType.Widget )
{
Identifier = identifier;
Keys = keyBind;
Type = type;
TargetOverride = null;
}
public ShortcutAttribute( string identifier, string keyBind, Type targetOverride, ShortcutType type = ShortcutType.Widget )
{
Identifier = identifier;
Keys = keyBind;
Type = type;
TargetOverride = targetOverride;
}
public string Identifier { get; }
public string Keys { get; }
public ShortcutType Type { internal set; get; }
public Type TargetOverride { get; set; }
}
public enum ShortcutType
{
Widget,
Window,
Application
}