private void PresetDropDown(Rect rect)
{
if (EditorGUI.ButtonMouseDown(rect, EditorGUI.GUIContents.titleSettingsIcon, FocusType.Passive, EditorStyles.inspectorTitlebarText))
{
if (this.m_Curve != null)
{
if (this.m_CurvePresets == null)
{
Debug.LogError("Curve presets error");
}
else
{
this.ValidateCurveLibraryTypeAndScale();
AnimationCurve animationCurve = new AnimationCurve();
Rect rect2;
if (this.GetNormalizationRect(out rect2))
{
bool realToNormalized = true;
animationCurve.keys = CurveEditorWindow.CopyAndScaleCurveKeys(this.m_Curve.keys, rect2, realToNormalized);
}
else
{
animationCurve = new AnimationCurve(this.m_Curve.keys);
}
animationCurve.postWrapMode = this.m_Curve.postWrapMode;
animationCurve.preWrapMode = this.m_Curve.preWrapMode;
this.m_CurvePresets.curveToSaveAsPreset = animationCurve;
PopupWindow.Show(rect, this.m_CurvePresets);
}
}
}
}