2
0

MenuItem.cs 689 B

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