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; }
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); } }
public SeqenceState(SeqenceWindow win) { window = win; Initial(); }
public static void ShowWindow() { inst = GetWindow <SeqenceWindow>(typeof(SceneView)); inst.titleContent = new GUIContent("Seqence", "Seqence Editor"); }