TimelineActiveMode.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. namespace UnityEditor.Timeline
  2. {
  3. class TimelineActiveMode : TimelineMode
  4. {
  5. public TimelineActiveMode()
  6. {
  7. headerState = new HeaderState
  8. {
  9. breadCrumb = TimelineModeGUIState.Enabled,
  10. options = TimelineModeGUIState.Enabled,
  11. sequenceSelector = TimelineModeGUIState.Enabled
  12. };
  13. trackOptionsState = new TrackOptionsState
  14. {
  15. newButton = TimelineModeGUIState.Enabled,
  16. editAsAssetButton = TimelineModeGUIState.Hidden
  17. };
  18. mode = TimelineModes.Active;
  19. }
  20. public override bool ShouldShowTimeCursor(WindowState state)
  21. {
  22. return true;
  23. }
  24. public override bool ShouldShowPlayRange(WindowState state)
  25. {
  26. return state.playRangeEnabled;
  27. }
  28. public override TimelineModeGUIState ToolbarState(WindowState state)
  29. {
  30. return TimelineModeGUIState.Enabled;
  31. }
  32. public override TimelineModeGUIState TrackState(WindowState state)
  33. {
  34. return TimelineModeGUIState.Enabled;
  35. }
  36. }
  37. }