TransitionLibraryWindowPage.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Animancer // https://kybernetik.com.au/animancer // Copyright 2018-2024 Kybernetik //
  2. #if UNITY_EDITOR
  3. using System;
  4. using UnityEngine;
  5. namespace Animancer.Editor.TransitionLibraries
  6. {
  7. /// <summary>[Editor-Only]
  8. /// Manages the selection of pages in the <see cref="TransitionLibraryWindow"/>.
  9. /// </summary>
  10. /// https://kybernetik.com.au/animancer/api/Animancer.Editor.TransitionLibraries/TransitionLibraryWindowPage
  11. [Serializable]
  12. public abstract class TransitionLibraryWindowPage : IComparable<TransitionLibraryWindowPage>
  13. {
  14. /************************************************************************************************************************/
  15. /// <summary>The window containing this page.</summary>
  16. public TransitionLibraryWindow Window { get; set; }
  17. /************************************************************************************************************************/
  18. /// <summary>The name of this page.</summary>
  19. public abstract string DisplayName { get; }
  20. /// <summary>The text to use for the tooltip on the help button while this page is visible.</summary>
  21. public abstract string HelpTooltip { get; }
  22. /************************************************************************************************************************/
  23. /// <summary>The sorting index of this page.</summary>
  24. public abstract int Index { get; }
  25. /// <summary>Compares the <see cref="Index"/>.</summary>
  26. public int CompareTo(TransitionLibraryWindowPage other)
  27. => Index.CompareTo(other.Index);
  28. /************************************************************************************************************************/
  29. /// <summary>Draws the GUI of this page.</summary>
  30. public abstract void OnGUI(Rect area);
  31. /************************************************************************************************************************/
  32. }
  33. }
  34. #endif