SRTab.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. namespace SRDebugger.UI.Other
  2. {
  3. using System;
  4. using Controls;
  5. using SRF;
  6. using UnityEngine;
  7. using UnityEngine.Serialization;
  8. public class SRTab : SRMonoBehaviourEx
  9. {
  10. /// <summary>
  11. /// Content that will be added to the content area of the header
  12. /// </summary>
  13. public RectTransform HeaderExtraContent;
  14. [Obsolete] [HideInInspector] public Sprite Icon;
  15. /// <summary>
  16. /// Content that will be added to the content area of the tab button
  17. /// </summary>
  18. public RectTransform IconExtraContent;
  19. public string IconStyleKey = "Icon_Stompy";
  20. public int SortIndex;
  21. [HideInInspector] public SRTabButton TabButton;
  22. public string Title
  23. {
  24. get { return _title; }
  25. }
  26. public string LongTitle
  27. {
  28. get { return !string.IsNullOrEmpty(_longTitle) ? _longTitle : _title; }
  29. }
  30. public string Key
  31. {
  32. get { return _key; }
  33. }
  34. #pragma warning disable 649
  35. [SerializeField] [FormerlySerializedAs("Title")] private string _title;
  36. [SerializeField] private string _longTitle;
  37. [SerializeField] private string _key;
  38. #pragma warning restore 649
  39. }
  40. }