Exemple #1
0
 public static void OnEditAnimationEvent(AnimationWindowEvent awe)
 {
     AnimationWindowEventInspector.OnEditAnimationEvents(new AnimationWindowEvent[]
     {
         awe
     });
 }
 public void Draw(Rect window)
 {
     EditorGUI.indentLevel++;
     if (this.m_Events != null && this.m_Events.Length > 0)
     {
         AnimationWindowEventInspector.OnEditAnimationEvents(this.m_Events);
     }
     else
     {
         AnimationWindowEventInspector.OnDisabledAnimationEvent();
     }
     EditorGUI.indentLevel--;
     if (this.m_InstantTooltipText != null && this.m_InstantTooltipText != "")
     {
         GUIStyle gUIStyle = "AnimationEventTooltip";
         Vector2  vector   = gUIStyle.CalcSize(new GUIContent(this.m_InstantTooltipText));
         Rect     position = new Rect(window.x + this.m_InstantTooltipPoint.x, window.y + this.m_InstantTooltipPoint.y, vector.x, vector.y);
         if (position.xMax > window.width)
         {
             position.x = window.width - position.width;
         }
         GUI.Label(position, this.m_InstantTooltipText, gUIStyle);
     }
 }
Exemple #3
0
 public override void OnInspectorGUI()
 {
     AnimationWindowEvent[] awEvents = (from o in base.targets
                                        select o as AnimationWindowEvent).ToArray <AnimationWindowEvent>();
     AnimationWindowEventInspector.OnEditAnimationEvents(awEvents);
 }