HasDoubleAnimationCurve() public static method

public static HasDoubleAnimationCurve ( ) : bool
return bool
示例#1
0
        static internal void Show(Rect position, SerializedProperty property, SerializedProperty property2, SerializedProperty scalar, Rect curveRanges, ParticleSystemCurveEditor curveEditor)
        {
            // Curve context menu
            GUIContent copy  = EditorGUIUtility.TrTextContent("Copy");
            GUIContent paste = EditorGUIUtility.TrTextContent("Paste");

            GenericMenu menu = new GenericMenu();

            bool isRegion   = property != null && property2 != null;
            bool validPaste = (isRegion && ParticleSystemClipboard.HasDoubleAnimationCurve()) || (!isRegion && ParticleSystemClipboard.HasSingleAnimationCurve());

            AnimationCurveContextMenu obj = new AnimationCurveContextMenu(property, property2, scalar, curveRanges, curveEditor);

            menu.AddItem(copy, false, obj.Copy);
            if (validPaste)
            {
                menu.AddItem(paste, false, obj.Paste);
            }
            else
            {
                menu.AddDisabledItem(paste);
            }

            menu.DropDown(position);
        }
        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 genericMenu           = new GenericMenu();
            bool        flag                  = property != null && property2 != null;
            bool        flag2                 = (flag && ParticleSystemClipboard.HasDoubleAnimationCurve()) || (!flag && ParticleSystemClipboard.HasSingleAnimationCurve());
            AnimationCurveContextMenu @object = new AnimationCurveContextMenu(property, property2, scalar, curveRanges, curveEditor);

            genericMenu.AddItem(content, false, new GenericMenu.MenuFunction(@object.Copy));
            if (flag2)
            {
                genericMenu.AddItem(content2, false, new GenericMenu.MenuFunction(@object.Paste));
            }
            else
            {
                genericMenu.AddDisabledItem(content2);
            }
            genericMenu.DropDown(position);
        }