RichTextSymbol.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. using Unity.Collections;
  2. namespace LitMotion
  3. {
  4. internal enum RichTextSymbolType : byte
  5. {
  6. Text,
  7. TagStart,
  8. TagEnd
  9. }
  10. internal readonly struct RichTextSymbol32Bytes
  11. {
  12. public RichTextSymbol32Bytes(RichTextSymbolType type, in FixedString32Bytes text)
  13. {
  14. Type = type;
  15. Text = text;
  16. }
  17. public readonly RichTextSymbolType Type;
  18. public readonly FixedString32Bytes Text;
  19. }
  20. internal readonly struct RichTextSymbol64Bytes
  21. {
  22. public RichTextSymbol64Bytes(RichTextSymbolType type, in FixedString64Bytes text)
  23. {
  24. Type = type;
  25. Text = text;
  26. }
  27. public readonly RichTextSymbolType Type;
  28. public readonly FixedString64Bytes Text;
  29. }
  30. internal readonly struct RichTextSymbol128Bytes
  31. {
  32. public RichTextSymbol128Bytes(RichTextSymbolType type, in FixedString128Bytes text)
  33. {
  34. Type = type;
  35. Text = text;
  36. }
  37. public readonly RichTextSymbolType Type;
  38. public readonly FixedString128Bytes Text;
  39. }
  40. internal readonly struct RichTextSymbol512Bytes
  41. {
  42. public RichTextSymbol512Bytes(RichTextSymbolType type, in FixedString512Bytes text)
  43. {
  44. Type = type;
  45. Text = text;
  46. }
  47. public readonly RichTextSymbolType Type;
  48. public readonly FixedString512Bytes Text;
  49. }
  50. internal struct RichTextSymbol4096Bytes
  51. {
  52. public RichTextSymbol4096Bytes(RichTextSymbolType type, in FixedString4096Bytes text)
  53. {
  54. Type = type;
  55. Text = text;
  56. }
  57. public RichTextSymbolType Type;
  58. public FixedString4096Bytes Text;
  59. }
  60. }