GUITextBox.cs 1.1 KB

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