mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-23 05:39:39 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
37 lines
768 B
C#
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
|
|
}
|