IInputField.cs 1.1 KB

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