private void EventsGUI()
{
if (this.m_ClipInfo != null)
{
GUILayout.BeginHorizontal(new GUILayoutOption[0]);
GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.Width(25f) };
if (GUILayout.Button(styles.AddEventContent, options))
{
this.m_ClipInfo.AddEvent(this.m_AvatarPreview.timeControl.normalizedTime);
this.m_EventManipulationHandler.SelectEvent(this.m_ClipInfo.GetEvents(), this.m_ClipInfo.GetEventCount() - 1, this.m_ClipInfo);
}
Rect position = GUILayoutUtility.GetRect((float) 10f, (float) 33f);
position.xMin += 5f;
position.xMax -= 4f;
GUI.Label(position, string.Empty, "TE Toolbar");
if (Event.current.type == EventType.Repaint)
{
this.m_EventTimeArea.rect = position;
}
position.height -= 15f;
this.m_EventTimeArea.TimeRuler(position, 100f);
GUI.BeginGroup(new Rect(position.x + 1f, position.y + 1f, position.width - 2f, position.height - 2f));
Rect rect = new Rect(-1f, -1f, position.width, position.height);
AnimationEvent[] events = this.m_ClipInfo.GetEvents();
if (this.m_EventManipulationHandler.HandleEventManipulation(rect, ref events, this.m_ClipInfo))
{
this.m_ClipInfo.SetEvents(events);
}
float x = this.m_EventTimeArea.TimeToPixel(this.m_AvatarPreview.timeControl.normalizedTime, rect) - 0.5f;
Handles.color = new Color(1f, 0f, 0f, 0.5f);
Handles.DrawLine((Vector3) new Vector2(x, rect.yMin), (Vector3) new Vector2(x, rect.yMax));
Handles.DrawLine((Vector3) new Vector2(x + 1f, rect.yMin), (Vector3) new Vector2(x + 1f, rect.yMax));
Handles.color = Color.white;
GUI.EndGroup();
GUILayout.EndHorizontal();
this.m_EventManipulationHandler.DrawInstantTooltip(position);
}
}