IInputField.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using UnityEngine;
  2. namespace WebGLSupport
  3. {
  4. public enum ContentType
  5. {
  6. Standard = 0,
  7. Autocorrected = 1,
  8. IntegerNumber = 2,
  9. DecimalNumber = 3,
  10. Alphanumeric = 4,
  11. Name = 5,
  12. EmailAddress = 6,
  13. Password = 7,
  14. Pin = 8,
  15. Custom = 9
  16. }
  17. public enum LineType
  18. {
  19. SingleLine = 0,
  20. MultiLineSubmit = 1,
  21. MultiLineNewline = 2
  22. }
  23. public interface IInputField
  24. {
  25. ContentType contentType { get; }
  26. LineType lineType { get; }
  27. int fontSize { get; }
  28. string text { get; set; }
  29. string placeholder { get; }
  30. int characterLimit { get; }
  31. int caretPosition { get; }
  32. bool isFocused { get; }
  33. int selectionFocusPosition { get; set; }
  34. int selectionAnchorPosition { get; set; }
  35. bool ReadOnly { get; }
  36. bool OnFocusSelectAll { get; }
  37. bool EnableMobileSupport { get; }
  38. Rect GetScreenCoordinates();
  39. void ActivateInputField();
  40. void DeactivateInputField();
  41. void Rebuild();
  42. }
  43. }