GUIPanel.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. using System;
  4. using System.Runtime.CompilerServices;
  5. namespace BansheeEngine
  6. {
  7. /** @addtogroup GUI_Engine
  8. * @{
  9. */
  10. /// <summary>
  11. /// Represents a GUI panel that you can use for free placement of GUI elements within its bounds.
  12. /// </summary>
  13. public sealed class GUIPanel : GUILayout
  14. {
  15. private GUIPanel()
  16. { }
  17. /// <summary>
  18. /// Constructs a new GUI panel object.
  19. /// </summary>
  20. /// <param name="depth">Depth at which to position the panel. Panels with lower depth will be displayed in front of
  21. /// panels with higher depth. Provided depth is relative to the depth of the parent GUI panel.
  22. /// The depth value will be clamped if outside of the depth range of the parent GUI panel.</param>
  23. /// <param name="depthRangeMin">Smallest depth offset allowed by any child GUI panels. If a child panel has a depth
  24. /// offset lower than this value it will be clamped.</param>
  25. /// <param name="depthRangeMax">Largest depth offset allowed by any child GUI panels. If a child panel has a depth
  26. /// offset higher than this value it will be clamped.</param>
  27. /// <param name="options">Options that allow you to control how is the panel positioned and sized.</param>
  28. public GUIPanel(Int16 depth = 0, ushort depthRangeMin = ushort.MaxValue, ushort depthRangeMax = ushort.MaxValue,
  29. params GUIOption[] options)
  30. {
  31. Internal_CreateInstancePanel(this, depth, depthRangeMin, depthRangeMax, options);
  32. }
  33. /// <summary>
  34. /// Constructs a new GUI panel object.
  35. /// </summary>
  36. /// <param name="options">Options that allow you to control how is the panel positioned and sized.</param>
  37. public GUIPanel(params GUIOption[] options)
  38. {
  39. Internal_CreateInstancePanel(this, 0, ushort.MaxValue, ushort.MaxValue, options);
  40. }
  41. }
  42. /** @} */
  43. }