public void OnGUI(Rect timeRect, Rect contentRect)
        {
            if (Event.current.type != EventType.Repaint)
            {
                return;
            }

            m_Rect        = timeRect;
            m_ContentRect = contentRect;

            m_PlayHeadCursor.OnGUI(m_Rect, m_Rect.xMin + TimeToPixel(state.CurrentTime));
        }
Пример #2
0
        public void OnGUI(Rect timeRect, Rect contentRect)
        {
            if (Event.current.type != EventType.Repaint)
            {
                return;
            }

            m_Rect        = timeRect;
            m_ContentRect = contentRect;

            GUI.BeginClip(timeRect);
            m_PlayHeadCursor.OnGUI(m_Rect, m_Rect.xMin + TimeToPixel(state.CurrentTime));

            var iconContent = EditorGUIUtility.IconContent("Animation.EventMarker");
            var position    = new Rect(m_Rect.xMin + TimeToPixel(state.CurrentTime) - iconContent.image.width / 2.0f, 2, 16, 30);

            GUI.Box(position, iconContent, GUIStyle.none);
            GUI.EndClip();
        }