コード例 #1
0
ファイル: TimeIndicator.cs プロジェクト: 0geova0/Jam
        public static void Draw(WindowState state, double time)
        {
            var bounds = state.timeAreaRect;

            bounds.xMin = Mathf.Max(bounds.xMin, state.TimeToTimeAreaPixel(time));

            using (new GUIViewportScope(state.timeAreaRect))
            {
                s_Tooltip.text = TimeReferenceUtility.ToTimeString(time);

                var tooltipBounds = s_Tooltip.bounds;
                tooltipBounds.xMin = bounds.xMin - (tooltipBounds.width / 2.0f);
                tooltipBounds.y    = bounds.y;
                s_Tooltip.bounds   = tooltipBounds;

                if (time >= 0)
                {
                    s_Tooltip.Draw();
                }
            }

            if (time >= 0)
            {
                Graphics.DrawLineAtTime(state, time, Color.black, true);
            }
        }
コード例 #2
0
ファイル: SnapEngine.cs プロジェクト: 0geova0/Jam
        void DrawMagnetLineAt(double time)
        {
            var magnet = GetMagnetAt(time);

            if (magnet != null && magnet.showSnapHint)
            {
                Graphics.DrawLineAtTime(m_State, magnet.time, Color.white);
            }
        }