UnityEditor.AnimationCurveContextMenu.Show C# (CSharp) Method

Show() static private method

static private Show ( Rect position, UnityEditor.SerializedProperty property, UnityEditor.SerializedProperty property2, UnityEditor.SerializedProperty scalar, Rect curveRanges, ParticleSystemCurveEditor curveEditor ) : void
position UnityEngine.Rect
property UnityEditor.SerializedProperty
property2 UnityEditor.SerializedProperty
scalar UnityEditor.SerializedProperty
curveRanges UnityEngine.Rect
curveEditor ParticleSystemCurveEditor
return void
        internal static void Show(Rect position, SerializedProperty property, SerializedProperty property2, SerializedProperty scalar, Rect curveRanges, ParticleSystemCurveEditor curveEditor)
        {
            GUIContent content = new GUIContent("Copy");
            GUIContent content2 = new GUIContent("Paste");
            GenericMenu menu = new GenericMenu();
            bool flag = (property != null) && (property2 != null);
            bool flag2 = (flag && ParticleSystemClipboard.HasDoubleAnimationCurve()) || (!flag && ParticleSystemClipboard.HasSingleAnimationCurve());
            AnimationCurveContextMenu menu2 = new AnimationCurveContextMenu(property, property2, scalar, curveRanges, curveEditor);
            menu.AddItem(content, false, new GenericMenu.MenuFunction(menu2.Copy));
            if (flag2)
            {
                menu.AddItem(content2, false, new GenericMenu.MenuFunction(menu2.Paste));
            }
            else
            {
                menu.AddDisabledItem(content2);
            }
            menu.DropDown(position);
        }
    }

Usage Example

示例#1
0
 public bool OnCurveAreaMouseDown(int button, Rect drawRect, Rect curveRanges)
 {
     if (button == 0)
     {
         this.ToggleCurveInEditor();
         return(true);
     }
     if (button == 1)
     {
         AnimationCurveContextMenu.Show(drawRect, this.maxCurve, this.GetMinCurve(), this.scalar, curveRanges, this.m_Module.GetParticleSystemCurveEditor());
         return(true);
     }
     return(false);
 }
All Usage Examples Of UnityEditor.AnimationCurveContextMenu::Show