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