StyledBanner.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. using UnityEngine;
  2. namespace Boxophobic.StyledGUI
  3. {
  4. public class StyledBanner : PropertyAttribute
  5. {
  6. public float colorR;
  7. public float colorG;
  8. public float colorB;
  9. public string title;
  10. public string helpURL;
  11. public StyledBanner(string title)
  12. {
  13. this.colorR = -1;
  14. this.title = title;
  15. this.helpURL = "";
  16. }
  17. public StyledBanner(string title, string helpURL)
  18. {
  19. this.colorR = -1;
  20. this.title = title;
  21. this.helpURL = helpURL;
  22. }
  23. public StyledBanner(float colorR, float colorG, float colorB, string title, string helpURL)
  24. {
  25. this.colorR = colorR;
  26. this.colorG = colorG;
  27. this.colorB = colorB;
  28. this.title = title;
  29. this.helpURL = helpURL;
  30. }
  31. // Legacy
  32. public StyledBanner(string title, string subtitle, string helpURL)
  33. {
  34. this.colorR = -1;
  35. this.title = title;
  36. this.helpURL = helpURL;
  37. }
  38. public StyledBanner(float colorR, float colorG, float colorB, string title, string subtitle, string helpURL)
  39. {
  40. this.colorR = colorR;
  41. this.colorG = colorG;
  42. this.colorB = colorB;
  43. this.title = title;
  44. this.helpURL = helpURL;
  45. }
  46. }
  47. }