GUILabel.cs 974 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. namespace BansheeEngine
  4. {
  5. public sealed class GUILabel : GUIElement
  6. {
  7. public GUILabel(GUIContent content, string style, params GUIOption[] options)
  8. {
  9. Internal_CreateInstance(this, content, style, options);
  10. }
  11. public GUILabel(GUIContent content, string style = "")
  12. {
  13. Internal_CreateInstance(this, content, style, new GUIOption[0]);
  14. }
  15. public void SetContent(GUIContent content)
  16. {
  17. Internal_SetContent(mCachedPtr, content);
  18. }
  19. [MethodImpl(MethodImplOptions.InternalCall)]
  20. private static extern void Internal_CreateInstance(GUILabel instance, GUIContent content, string style, GUIOption[] options);
  21. [MethodImpl(MethodImplOptions.InternalCall)]
  22. private static extern void Internal_SetContent(IntPtr nativeInstance, GUIContent content);
  23. }
  24. }