DefaultSize.cs 935 B

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