MenuItem.cs 593 B

123456789101112131415161718192021222324
  1. using System;
  2. namespace BansheeEditor
  3. {
  4. [AttributeUsage(AttributeTargets.Method)]
  5. public sealed class MenuItem : Attribute
  6. {
  7. public MenuItem(string path, ShortcutKey shortcut, int priority = 0)
  8. {
  9. this.path = path;
  10. this.shortcut = shortcut;
  11. this.priority = priority;
  12. }
  13. public MenuItem(string path, int priority = 0)
  14. {
  15. this.path = path;
  16. this.priority = priority;
  17. }
  18. private string path;
  19. private ShortcutKey shortcut;
  20. private int priority;
  21. }
  22. }