GUI.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. namespace BansheeEngine
  4. {
  5. public sealed class GUI : GUIBase
  6. {
  7. private static GUI instance = new GUI();
  8. internal GUI()
  9. {
  10. Internal_CreateInstance(this);
  11. }
  12. public new static GUIArea AddArea(int x, int y, int width = 0, int height = 0, short depth = 0)
  13. {
  14. return ((GUIBase)instance).AddArea(x, y, width, height, depth);
  15. }
  16. public new static GUIArea AddResizableAreaX(int offsetLeft, int offsetRight, int offsetTop, int height, short depth = 0)
  17. {
  18. return ((GUIBase)instance).AddResizableAreaX(offsetLeft, offsetRight, offsetTop, height, depth);
  19. }
  20. public new static GUIArea AddResizableAreaY(int offsetTop, int offsetBottom, int offsetLeft, int width, short depth = 0)
  21. {
  22. return ((GUIBase)instance).AddResizableAreaY(offsetTop, offsetBottom, offsetLeft, width, depth);
  23. }
  24. public new static GUIArea AddResizableAreaXY(int offsetLeft, int offsetRight, int offsetTop, int offsetBottom, short depth = 0)
  25. {
  26. return ((GUIBase)instance).AddResizableAreaXY(offsetLeft, offsetRight, offsetTop, offsetBottom, depth);
  27. }
  28. [MethodImpl(MethodImplOptions.InternalCall)]
  29. private static extern void Internal_CreateInstance(GUI instance);
  30. }
  31. }