GUIPanel.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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.
  17. /// The depth value will be clamped if outside of the depth range of the parent GUI panel.</param>
  18. /// <param name="depthRangeMin">Smallest depth offset allowed by any child GUI panels. If a child panel has a depth
  19. /// offset lower than this value it will be clamped.</param>
  20. /// <param name="depthRangeMax">Largest depth offset allowed by any child GUI panels. If a child panel has a depth
  21. /// offset higher than this value it will be clamped.</param>
  22. /// <param name="options">Options that allow you to control how is the panel positioned and sized.</param>
  23. public GUIPanel(Int16 depth = 0, ushort depthRangeMin = ushort.MaxValue, ushort depthRangeMax = ushort.MaxValue,
  24. params GUIOption[] options)
  25. {
  26. Internal_CreateInstancePanel(this, depth, depthRangeMin, depthRangeMax, options);
  27. }
  28. /// <summary>
  29. /// Constructs a new GUI panel object.
  30. /// </summary>
  31. /// <param name="options">Options that allow you to control how is the panel positioned and sized.</param>
  32. public GUIPanel(params GUIOption[] options)
  33. {
  34. Internal_CreateInstancePanel(this, 0, ushort.MaxValue, ushort.MaxValue, options);
  35. }
  36. }
  37. }