Beispiel #1
0
 void OnGUI()
 {
     if (inst == null)
     {
         inst = this;
     }
     TransportToolbarGUI();
     state?.CheckExist();
     if (state.seqence)
     {
         TimelineTimeAreaGUI();
         TimelineHeaderGUI();
         DrawMarkerDrawer();
         tree.OnGUI(state);
         DrawTimeOnSlider();
         DrawSptLine();
         DrawEndLine();
         EventHandler();
     }
     else
     {
         CalculWindowCenter();
         EditorGUI.LabelField(centerArea, SeqenceStyle.createNewTimelineText);
     }
     winArea = position;
 }
Beispiel #2
0
        public static void DrawLineAtTime(SeqenceWindow win, float time, Color color, bool dotted = false)
        {
            var t  = win.TimeToPixel(time);
            var p0 = new Vector3(t, win.timeAreaRect.yMax);
            var p1 = new Vector3(t, win.timeAreaRect.yMax + win.winArea.height - WindowConstants.sliderWidth);

            if (dotted)
            {
                DrawDottedLine(p0, p1, 4.0f, color);
            }
            else
            {
                DrawLine(p0, p1, color);
            }
        }
Beispiel #3
0
 public SeqenceState(SeqenceWindow win)
 {
     window = win;
     Initial();
 }
Beispiel #4
0
 public static void ShowWindow()
 {
     inst = GetWindow <SeqenceWindow>(typeof(SceneView));
     inst.titleContent = new GUIContent("Seqence", "Seqence Editor");
 }