TextSettings.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace DamageNumbersPro {
  5. [System.Serializable]
  6. public struct TextSettings
  7. {
  8. public TextSettings(float customDefault)
  9. {
  10. horizontal = customDefault;
  11. customColor = false;
  12. color = new Color(1, 1, 0f, 1);
  13. size = 0;
  14. vertical = 0;
  15. characterSpacing = 0f;
  16. alpha = 1;
  17. mark = false;
  18. markColor = new Color(0, 0, 0, 0.5f);
  19. bold = false;
  20. italic = false;
  21. underline = false;
  22. strike = false;
  23. }
  24. [Header("Basics:")]
  25. [Tooltip("Makes the text bold.")]
  26. public bool bold;
  27. [Tooltip("Makes the text italic.")]
  28. public bool italic;
  29. [Tooltip("Adds an underline to the text.")]
  30. public bool underline;
  31. [Tooltip("Strikes through the text with a line.")]
  32. public bool strike;
  33. [Header("Alpha:")]
  34. [Range(0, 1)]
  35. [Tooltip("Changes the alpha of the text.\nWon't work if Custom Color is used.")]
  36. public float alpha;
  37. [Header("Color:")]
  38. [Tooltip("Changes the color of the text.\nOverrides the alpha option above.")]
  39. public bool customColor;
  40. public Color color;
  41. [Header("Mark:")]
  42. [Tooltip("Highlights the text with a custom color.")]
  43. public bool mark;
  44. public Color markColor;
  45. [Header("Offset:")]
  46. [Tooltip("Horizontally moves the text.\nCan be used to offset the prefix or suffix.")]
  47. public float horizontal;
  48. [Tooltip("Vertically moves the text.\nCan be used to offset the prefix or suffix.")]
  49. public float vertical;
  50. [Header("Extra:")]
  51. [Tooltip("Changes the character spacing.")]
  52. public float characterSpacing;
  53. [Tooltip("Changes the font size.")]
  54. public float size;
  55. }
  56. }