GUI.cs 940 B

12345678910111213141516171819202122232425262728
  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 AddResizableArea(int offsetLeft, int offsetRight, int offsetTop, int offsetBottom, GUIArea.ResizeAxis resizeAxis, short depth = 0)
  17. {
  18. return ((GUIBase)instance).AddResizableArea(offsetLeft, offsetRight, offsetTop, offsetBottom, resizeAxis, depth);
  19. }
  20. [MethodImpl(MethodImplOptions.InternalCall)]
  21. private static extern void Internal_CreateInstance(GUI instance);
  22. }
  23. }