GUITextBox.cs 1.1 KB

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. namespace BansheeEngine
  4. {
  5. public sealed class GUITextBox : GUIElement
  6. {
  7. internal GUITextBox(GUILayout parentLayout, bool multiline, GUIElementStyle style, params GUIOption[] options)
  8. :base(parentLayout)
  9. {
  10. Internal_CreateInstance(this, parentLayout, multiline, style, options);
  11. }
  12. public string text
  13. {
  14. get { string value; Internal_GetText(mCachedPtr, out value); return value; }
  15. set { Internal_SetText(mCachedPtr, value); }
  16. }
  17. [MethodImpl(MethodImplOptions.InternalCall)]
  18. private static extern void Internal_CreateInstance(GUITextBox instance, GUILayout layout, bool multiline, GUIElementStyle style, GUIOption[] options);
  19. [MethodImpl(MethodImplOptions.InternalCall)]
  20. private static extern void Internal_SetText(IntPtr nativeInstance, string text);
  21. [MethodImpl(MethodImplOptions.InternalCall)]
  22. private static extern void Internal_GetText(IntPtr nativeInstance, out string text);
  23. }
  24. }