説明なし
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

TrackItemsDrawer.cs 898B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System.Collections.Generic;
  2. using UnityEngine;
  3. namespace UnityEditor.Timeline
  4. {
  5. struct TrackItemsDrawer
  6. {
  7. List<ILayer> m_Layers;
  8. ClipsLayer m_ClipsLayer;
  9. public List<TimelineClipGUI> clips => m_ClipsLayer.items;
  10. public TrackItemsDrawer(IRowGUI parent)
  11. {
  12. m_Layers = null;
  13. m_ClipsLayer = null;
  14. BuildGUICache(parent);
  15. }
  16. void BuildGUICache(IRowGUI parent)
  17. {
  18. m_ClipsLayer = new ClipsLayer(Layer.Clips, parent);
  19. m_Layers = new List<ILayer>
  20. {
  21. m_ClipsLayer,
  22. new MarkersLayer(Layer.Markers, parent)
  23. };
  24. }
  25. public void Draw(Rect rect, WindowState state)
  26. {
  27. foreach (var layer in m_Layers)
  28. {
  29. layer.Draw(rect, state);
  30. }
  31. }
  32. }
  33. }