コード例 #1
0
ファイル: DopeSheetEditor.cs プロジェクト: demelev/projectHL
 public void OnGUI(AnimationWindowState state, AnimationWindowKeyframe keyframe)
 {
     if (!keyframe.isPPtrCurve)
     {
         this.backgroundRect = this.position;
         this.backgroundRect.x = (state.TimeToPixel(keyframe.time) + this.position.x) - (s_width / 2);
         this.backgroundRect.y += 16f;
         this.backgroundRect.width = s_width;
         this.backgroundRect.height = s_height;
         Rect backgroundRect = this.backgroundRect;
         backgroundRect.height = 16f;
         Rect position = this.backgroundRect;
         position.y += 16f;
         position.height = s_width;
         GUI.Box(this.backgroundRect, string.Empty);
         GUI.Box(position, AssetPreview.GetAssetPreview((UnityEngine.Object) keyframe.value));
         EditorGUI.BeginChangeCheck();
         UnityEngine.Object obj2 = EditorGUI.ObjectField(backgroundRect, (UnityEngine.Object) keyframe.value, keyframe.curve.m_ValueType, false);
         if (EditorGUI.EndChangeCheck())
         {
             keyframe.value = obj2;
             state.SaveCurve(keyframe.curve);
         }
     }
 }