Range.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. using System;
  4. namespace BansheeEngine
  5. {
  6. /** @addtogroup Serialization
  7. * @{
  8. */
  9. /// <summary>
  10. /// Makes an integer or a floating point field be displayed as a slider with a specified range in the inspector.
  11. /// </summary>
  12. [AttributeUsage(AttributeTargets.Field)]
  13. public sealed class Range : Attribute
  14. {
  15. /// <summary>
  16. /// Creates a new range attribute.
  17. /// </summary>
  18. /// <param name="min">Minimum boundary of the range to clamp the field value to.</param>
  19. /// <param name="max">Maximum boundary of the range to clamp the field value to.</param>
  20. ///
  21. public Range(float min, float max)
  22. {
  23. this.min = min;
  24. this.max = max;
  25. }
  26. private float min;
  27. private float max;
  28. }
  29. /** @} */
  30. }