Beispiel #1
0
        public override void OnInit()
        {
            PlayContent          = EditorGUIUtility.TrIconContent("Animation.Play", "Play the timeline");
            GotoBeginingContent  = EditorGUIUtility.TrIconContent("Animation.FirstKey", "Go to the beginning of the timeline");
            GotoEndContent       = EditorGUIUtility.TrIconContent("Animation.LastKey", "Go to the end of the timeline");
            NextFrameContent     = EditorGUIUtility.TrIconContent("Animation.NextKey", "Go to the next frame");
            PreviousFrameContent = EditorGUIUtility.TrIconContent("Animation.PrevKey", "Go to the previous frame");

            NewContent     = new GUIContent(TimelineStyle.LoadEdStyleImg("btn_editor_new.png"), "新建.");
            OpenContent    = new GUIContent(TimelineStyle.LoadEdStyleImg("btn_editor_open.png"), "打开.");
            SaveContent    = new GUIContent(TimelineStyle.LoadEdStyleImg("btn_editor_save.png"), "保存.");
            SettingContent = new GUIContent(TimelineStyle.LoadEdStyleImg("SettingsIcon.png"), "设置.");
        }
        public static void ShowDesignOverlay(
            TimelineStyle testStyle = null)
        {
            if (designOverlay == null)
            {
                dummyNoticeList = TimelineVisualNoticeModel.CreateDummyNotices(testStyle);

                designOverlay = CreateDesignOverlay();
            }

            designOverlay.Show();
            designOverlay.OverlayVisible = true;

            foreach (var notice in dummyNoticeList)
            {
                designOverlay.AddNotice(notice, true);
            }
        }
        public static void ShowDesignOverlay(
            TimelineStyle testStyle = null)
        {
            if (designOverlay == null)
            {
                dummyTimeline = TimelineModel.CreateDummyTimeline(testStyle);
                dummyTimeline.Controller.RefreshActivityLineVisibility();

                designOverlay       = CreateDesignOverlay();
                designOverlay.Model = dummyTimeline;
            }

            // 本番ビューを隠す
            if (TimelineView != null &&
                TimelineView.OverlayVisible)
            {
                TimelineView.OverlayVisible = false;
            }

            designOverlay.Show();
            designOverlay.OverlayVisible = true;
        }
Beispiel #4
0
        //绘制滑动游标
        private void DrawCursor()
        {
            //红色指引线
            GUILayout.BeginArea(TimeContent, string.Empty);

            Color cl01 = GUI.color;

            GUI.color = Color.red;
            float timeToPos = TimeToPixel(window.RunningTime);

            GUI.DrawTexture(new Rect(-ARROW_WIDTH + timeToPos - TimeHeaderRect.x, 2, ARROW_WIDTH * 2f, ARROW_WIDTH * 2f * 1.82f), TimelineStyle.LoadEdStyleImg("Timecursor.png"));

            GUI.color = cl01;
            Rect lineRect = new Rect(timeToPos - TimeHeaderRect.x, 18, 1, TimeContent.height + ARROW_WIDTH);

            EditorGUI.DrawRect(lineRect, Color.red);

            GUILayout.EndArea();
        }