2
0

GUIPanel.cs 2.2 KB

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