CustomHandle.cs 814 B

12345678910111213141516171819202122232425
  1. using System;
  2. using BansheeEngine;
  3. namespace BansheeEditor
  4. {
  5. /// <summary>
  6. /// Attribute that can be added to types deriving from <see cref="BansheeEditor.Handle"/>. That handle implementation
  7. /// will then be used whenever a handle for the type specified in this attribute needs to be displayed.
  8. /// </summary>
  9. [AttributeUsage(AttributeTargets.Class)]
  10. public sealed class CustomHandle : Attribute
  11. {
  12. private Type type;
  13. /// <summary>
  14. /// Creates a new custom handle attribute.
  15. /// </summary>
  16. /// <param name="type">Type deriving from <see cref="Component"/> for which the custom handle will be displayed.
  17. /// </param>
  18. public CustomHandle(Type type)
  19. {
  20. this.type = type;
  21. }
  22. }
  23. }