DefaultSize.cs 902 B

123456789101112131415161718192021222324252627282930
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. using System;
  4. namespace BansheeEditor
  5. {
  6. /** @addtogroup Window
  7. * @{
  8. */
  9. /// <summary>
  10. /// Can be placed on <see cref="EditorWindow"/> class to provide a default size for the window when it is first opened.
  11. /// </summary>
  12. [AttributeUsage(AttributeTargets.Class)]
  13. public sealed class DefaultSize : Attribute
  14. {
  15. #pragma warning disable 0414
  16. private int width = 400;
  17. private int height = 400;
  18. #pragma warning restore 0414
  19. public DefaultSize(int width, int height)
  20. {
  21. this.width = width;
  22. this.height = height;
  23. }
  24. }
  25. /** @} */
  26. }