GUIPanel.cs 1.9 KB

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