MenuItem.cs 848 B

1234567891011121314151617181920212223242526272829
  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, bool separator = false)
  9. {
  10. this.path = path;
  11. this.shortcut = new ShortcutKey(shortcutModifier, shortcutKey);
  12. this.priority = priority;
  13. this.separator = separator;
  14. }
  15. public MenuItem(string path, int priority = 0, bool separator = false)
  16. {
  17. this.path = path;
  18. this.priority = priority;
  19. this.separator = separator;
  20. }
  21. private string path;
  22. private ShortcutKey shortcut;
  23. private int priority;
  24. private bool separator;
  25. }
  26. }