public void Show(Action <AnimationCurve> onCurveChanged, CurveEditorSettings settings)
 {
     this.m_OnCurveChanged = onCurveChanged;
     this.delegateView     = null;
     this.Init(settings);
     base.ShowAuxWindow();
 }
Beispiel #2
0
        // Called by OnEnable to make sure the CurveEditor is not null,
        // and by Show so we get a fresh CurveEditor when the user clicks a new curve.
        void Init(CurveEditorSettings settings)
        {
            m_CurveEditor = new CurveEditor(GetCurveEditorRect(), GetCurveWrapperArray(), true);
            m_CurveEditor.curvesUpdated   = UpdateCurve;
            m_CurveEditor.scaleWithWindow = true;
            m_CurveEditor.margin          = 40;
            if (settings != null)
            {
                m_CurveEditor.settings = settings;
            }
            m_CurveEditor.settings.hTickLabelOffset   = 10;
            m_CurveEditor.settings.rectangleToolFlags = CurveEditorSettings.RectangleToolFlags.MiniRectangleTool;
            m_CurveEditor.settings.undoRedoSelection  = true;
            m_CurveEditor.settings.showWrapperPopups  = true;
            UpdateRegionDomain();

            // For each of horizontal and vertical axis, if we have a finite range for that axis, use that range,
            // otherwise use framing logic to determine shown range for that axis.
            bool frameH = true;
            bool frameV = true;

            if (!float.IsNegativeInfinity(m_CurveEditor.settings.hRangeMin) && !float.IsInfinity(m_CurveEditor.settings.hRangeMax))
            {
                m_CurveEditor.SetShownHRangeInsideMargins(m_CurveEditor.settings.hRangeMin, m_CurveEditor.settings.hRangeMax);
                frameH = false;
            }
            if (!float.IsNegativeInfinity(m_CurveEditor.settings.vRangeMin) && !float.IsInfinity(m_CurveEditor.settings.vRangeMax))
            {
                m_CurveEditor.SetShownVRangeInsideMargins(m_CurveEditor.settings.vRangeMin, m_CurveEditor.settings.vRangeMax);
                frameV = false;
            }

            m_CurveEditor.FrameSelected(frameH, frameV);
        }
 public void Show(GUIView viewToUpdate, CurveEditorSettings settings)
 {
     this.delegateView     = viewToUpdate;
     this.m_OnCurveChanged = null;
     this.Init(settings);
     base.ShowAuxWindow();
 }
Beispiel #4
0
        private void InitializeCurveEditor()
        {
            this.m_CurveEditor = new CurveEditor(new Rect(0.0f, 0.0f, this.contentWidth, 100f), new CurveWrapper[0], false);
            CurveEditorSettings curveEditorSettings = new CurveEditorSettings();

            curveEditorSettings.hTickStyle.distMin   = 30;
            curveEditorSettings.hTickStyle.distFull  = 80;
            curveEditorSettings.hTickStyle.distLabel = 0;
            if (EditorGUIUtility.isProSkin)
            {
                curveEditorSettings.vTickStyle.color      = new Color(1f, 1f, 1f, curveEditorSettings.vTickStyle.color.a);
                curveEditorSettings.vTickStyle.labelColor = new Color(1f, 1f, 1f, curveEditorSettings.vTickStyle.labelColor.a);
            }
            curveEditorSettings.vTickStyle.distMin   = 15;
            curveEditorSettings.vTickStyle.distFull  = 40;
            curveEditorSettings.vTickStyle.distLabel = 30;
            curveEditorSettings.vTickStyle.stubs     = true;
            curveEditorSettings.hRangeMin            = 0.0f;
            curveEditorSettings.hRangeLocked         = false;
            curveEditorSettings.vRangeLocked         = false;
            curveEditorSettings.hSlider   = true;
            curveEditorSettings.vSlider   = true;
            this.m_CurveEditor.shownArea  = new Rect(1f, 1f, 1f, 1f);
            this.m_CurveEditor.settings   = curveEditorSettings;
            this.m_CurveEditor.m_PlayHead = (IPlayHead)this.m_State;
        }
Beispiel #5
0
        // Called once during initialization of m_State
        private void InitializeCurveEditor()
        {
            // The rect here is only for initialization and will be overriden at layout
            m_CurveEditor = new CurveEditor(new Rect(0, 0, contentWidth, 100), new CurveWrapper[0], false);

            CurveEditorSettings settings = new CurveEditorSettings();

            settings.hTickStyle.distMin   = 30; // min distance between vertical lines before they disappear completely
            settings.hTickStyle.distFull  = 80; // distance between vertical lines where they gain full strength
            settings.hTickStyle.distLabel = 0;  // min distance between vertical lines labels
            if (EditorGUIUtility.isProSkin)
            {
                settings.vTickStyle.tickColor.color  = new Color(1, 1, 1, settings.vTickStyle.tickColor.color.a);  // color and opacity of horizontal lines
                settings.vTickStyle.labelColor.color = new Color(1, 1, 1, settings.vTickStyle.labelColor.color.a); // color and opacity of horizontal line labels
            }
            settings.vTickStyle.distMin   = 15;                                                                    // min distance between horizontal lines before they disappear completely
            settings.vTickStyle.distFull  = 40;                                                                    // distance between horizontal lines where they gain full strength
            settings.vTickStyle.distLabel = 30;                                                                    // min distance between horizontal lines labels
            settings.vTickStyle.stubs     = true;
            settings.hRangeMin            = 0;
            settings.hRangeLocked         = false;
            settings.vRangeLocked         = false;
            settings.hSlider = true;
            settings.vSlider = true;
            settings.allowDeleteLastKeyInCurve = true;
            settings.rectangleToolFlags        = CurveEditorSettings.RectangleToolFlags.FullRectangleTool;
            settings.undoRedoSelection         = true;

            m_CurveEditor.shownArea = new Rect(1, 1, 1, 1);
            m_CurveEditor.settings  = settings;
            m_CurveEditor.state     = m_State;
        }
        public ClipCurveEditor(CurveDataSource dataSource, TimelineWindow parentWindow)
        {
            this.m_DataSource  = dataSource;
            this.m_CurveEditor = new CurveEditor(new Rect(0f, 0f, 1000f, 100f), new CurveWrapper[0], false);
            ClipCurveEditor.s_CurveEditorSettings.set_hSlider(false);
            ClipCurveEditor.s_CurveEditorSettings.set_vSlider(false);
            ClipCurveEditor.s_CurveEditorSettings.set_hRangeLocked(false);
            ClipCurveEditor.s_CurveEditorSettings.set_vRangeLocked(false);
            ClipCurveEditor.s_CurveEditorSettings.set_scaleWithWindow(true);
            ClipCurveEditor.s_CurveEditorSettings.set_hRangeMin(0f);
            ClipCurveEditor.s_CurveEditorSettings.showAxisLabels            = true;
            ClipCurveEditor.s_CurveEditorSettings.allowDeleteLastKeyInCurve = true;
            ClipCurveEditor.s_CurveEditorSettings.rectangleToolFlags        = 0;
            CurveEditorSettings arg_F9_0  = ClipCurveEditor.s_CurveEditorSettings;
            TickStyle           tickStyle = new TickStyle();

            tickStyle.tickColor.set_color(DirectorStyles.Instance.customSkin.colorInlineCurveVerticalLines);
            tickStyle.distLabel = 20;
            tickStyle.stubs     = true;
            arg_F9_0.set_vTickStyle(tickStyle);
            CurveEditorSettings arg_135_0 = ClipCurveEditor.s_CurveEditorSettings;

            tickStyle = new TickStyle();
            tickStyle.tickColor.set_color(new Color(0f, 0f, 0f, 0f));
            tickStyle.distLabel = 0;
            arg_135_0.set_hTickStyle(tickStyle);
            this.m_CurveEditor.set_settings(ClipCurveEditor.s_CurveEditorSettings);
            this.m_CurveEditor.set_shownArea(new Rect(1f, 1f, 1f, 1f));
            this.m_CurveEditor.set_ignoreScrollWheelUntilClicked(true);
            this.m_CurveEditor.curvesUpdated = new CurveEditor.CallbackFunction(this.OnCurvesUpdated);
            this.m_BindingHierarchy          = new BindingSelector(parentWindow, this.m_CurveEditor);
        }
Beispiel #7
0
        private void Init(CurveEditorSettings settings)
        {
            this.m_CurveEditor = new CurveEditor(this.GetCurveEditorRect(), this.GetCurveWrapperArray(), true);
            this.m_CurveEditor.curvesUpdated   = new CurveEditor.CallbackFunction(this.UpdateCurve);
            this.m_CurveEditor.scaleWithWindow = true;
            this.m_CurveEditor.margin          = 40f;
            if (settings != null)
            {
                this.m_CurveEditor.settings = settings;
            }
            this.m_CurveEditor.settings.hTickLabelOffset   = 10f;
            this.m_CurveEditor.settings.rectangleToolFlags = CurveEditorSettings.RectangleToolFlags.MiniRectangleTool;
            this.m_CurveEditor.settings.undoRedoSelection  = true;
            this.m_CurveEditor.settings.showWrapperPopups  = true;
            bool horizontally = true;
            bool vertically   = true;

            if (this.m_CurveEditor.settings.hRangeMin != float.NegativeInfinity && this.m_CurveEditor.settings.hRangeMax != float.PositiveInfinity)
            {
                this.m_CurveEditor.SetShownHRangeInsideMargins(this.m_CurveEditor.settings.hRangeMin, this.m_CurveEditor.settings.hRangeMax);
                horizontally = false;
            }
            if (this.m_CurveEditor.settings.vRangeMin != float.NegativeInfinity && this.m_CurveEditor.settings.vRangeMax != float.PositiveInfinity)
            {
                this.m_CurveEditor.SetShownVRangeInsideMargins(this.m_CurveEditor.settings.vRangeMin, this.m_CurveEditor.settings.vRangeMax);
                vertically = false;
            }
            this.m_CurveEditor.FrameSelected(horizontally, vertically);
        }
Beispiel #8
0
        private void InitializeCurveEditor()
        {
            this.m_CurveEditor = new CurveEditor(new Rect(0f, 0f, this.contentWidth, 100f), new CurveWrapper[0], false);
            CurveEditorSettings curveEditorSettings = new CurveEditorSettings();

            curveEditorSettings.hTickStyle.distMin   = 30;
            curveEditorSettings.hTickStyle.distFull  = 80;
            curveEditorSettings.hTickStyle.distLabel = 0;
            if (EditorGUIUtility.isProSkin)
            {
                curveEditorSettings.vTickStyle.tickColor.color  = new Color(1f, 1f, 1f, curveEditorSettings.vTickStyle.tickColor.color.a);
                curveEditorSettings.vTickStyle.labelColor.color = new Color(1f, 1f, 1f, curveEditorSettings.vTickStyle.labelColor.color.a);
            }
            curveEditorSettings.vTickStyle.distMin   = 15;
            curveEditorSettings.vTickStyle.distFull  = 40;
            curveEditorSettings.vTickStyle.distLabel = 30;
            curveEditorSettings.vTickStyle.stubs     = true;
            curveEditorSettings.hRangeMin            = 0f;
            curveEditorSettings.hRangeLocked         = false;
            curveEditorSettings.vRangeLocked         = false;
            curveEditorSettings.hSlider = true;
            curveEditorSettings.vSlider = true;
            curveEditorSettings.allowDeleteLastKeyInCurve = true;
            curveEditorSettings.rectangleToolFlags        = CurveEditorSettings.RectangleToolFlags.FullRectangleTool;
            curveEditorSettings.undoRedoSelection         = true;
            this.m_CurveEditor.shownArea = new Rect(1f, 1f, 1f, 1f);
            this.m_CurveEditor.settings  = curveEditorSettings;
            this.m_CurveEditor.state     = this.m_State;
        }
        public void Show(GUIView viewToUpdate, CurveEditorSettings settings)
        {
            m_DelegateView   = viewToUpdate;
            m_OnCurveChanged = null;

            Init(settings);
            ShowAuxWindow();
        }
        public void Show(Action <AnimationCurve> onCurveChanged, CurveEditorSettings settings)
        {
            m_OnCurveChanged = onCurveChanged;
            m_DelegateView   = null;

            Init(settings);
            ShowAuxWindow();
        }
Beispiel #11
0
 public void Show(GUIView viewToUpdate, CurveEditorSettings settings)
 {
     this.delegateView = viewToUpdate;
     this.Init(settings);
     base.ShowAuxWindow();
     base.titleContent = new GUIContent("Curve");
     base.minSize      = new Vector2(240f, 286f);
     base.maxSize      = new Vector2(10000f, 10000f);
 }
Beispiel #12
0
        public void Show(GUIView viewToUpdate, CurveEditorSettings settings)
        {
            delegateView = viewToUpdate;
            Init(settings);
            ShowAuxWindow();
            titleContent = EditorGUIUtility.TrTextContent("Curve Editor");

            // deal with window size
            minSize = new Vector2(k_WindowMinSize, k_WindowMinSize + k_PresetsHeight);
            maxSize = new Vector2(k_WindowMaxSize, k_WindowMaxSize);
        }
Beispiel #13
0
 public TimeArea(bool minimalGUI) : base(minimalGUI)
 {
     this.m_Settings = new CurveEditorSettings();
     float[] tickModulos = new float[] {
         1E-07f, 5E-07f, 1E-06f, 5E-06f, 1E-05f, 5E-05f, 0.0001f, 0.0005f, 0.001f, 0.005f, 0.01f, 0.05f, 0.1f, 0.5f, 1f, 5f,
         10f, 50f, 100f, 500f, 1000f, 5000f, 10000f, 50000f, 100000f, 500000f, 1000000f, 5000000f, 1E+07f
     };
     this.hTicks = new TickHandler();
     this.hTicks.SetTickModulos(tickModulos);
     this.vTicks = new TickHandler();
     this.vTicks.SetTickModulos(tickModulos);
 }
Beispiel #14
0
 public TimeArea(bool minimalGUI) : base(minimalGUI)
 {
     this.m_Settings = new CurveEditorSettings();
     float[] tickModulos = new float[] { 
         1E-07f, 5E-07f, 1E-06f, 5E-06f, 1E-05f, 5E-05f, 0.0001f, 0.0005f, 0.001f, 0.005f, 0.01f, 0.05f, 0.1f, 0.5f, 1f, 5f, 
         10f, 50f, 100f, 500f, 1000f, 5000f, 10000f, 50000f, 100000f, 500000f, 1000000f, 5000000f, 1E+07f
      };
     this.hTicks = new TickHandler();
     this.hTicks.SetTickModulos(tickModulos);
     this.vTicks = new TickHandler();
     this.vTicks.SetTickModulos(tickModulos);
 }
 private void OnEditButtonClicked(string libraryPath)
 {
     Rect curveRanges = this.GetCurveRanges();
     CurveEditorSettings settings = new CurveEditorSettings();
     if (((curveRanges.width > 0f) && (curveRanges.height > 0f)) && ((curveRanges.width != float.PositiveInfinity) && (curveRanges.height != float.PositiveInfinity)))
     {
         settings.hRangeMin = curveRanges.xMin;
         settings.hRangeMax = curveRanges.xMax;
         settings.vRangeMin = curveRanges.yMin;
         settings.vRangeMax = curveRanges.yMax;
     }
     CurveEditorWindow.curve = new AnimationCurve();
     CurveEditorWindow.color = new Color(0f, 0.8f, 0f);
     CurveEditorWindow.instance.Show(GUIView.current, settings);
     CurveEditorWindow.instance.currentPresetLibrary = libraryPath;
 }
Beispiel #16
0
        private void OnEditButtonClicked(string libraryPath)
        {
            Rect curveRanges = this.GetCurveRanges();
            CurveEditorSettings curveEditorSettings = new CurveEditorSettings();

            if (curveRanges.width > 0f && curveRanges.height > 0f && curveRanges.width != float.PositiveInfinity && curveRanges.height != float.PositiveInfinity)
            {
                curveEditorSettings.hRangeMin = curveRanges.xMin;
                curveEditorSettings.hRangeMax = curveRanges.xMax;
                curveEditorSettings.vRangeMin = curveRanges.yMin;
                curveEditorSettings.vRangeMax = curveRanges.yMax;
            }
            CurveEditorWindow.curve = new AnimationCurve();
            CurveEditorWindow.color = new Color(0f, 0.8f, 0f);
            CurveEditorWindow.instance.Show(GUIView.current, curveEditorSettings);
            CurveEditorWindow.instance.currentPresetLibrary = libraryPath;
        }
Beispiel #17
0
        private void OnEditButtonClicked(string libraryPath)
        {
            Rect ranges = GetCurveRanges();
            CurveEditorSettings settings = new CurveEditorSettings();

            if (ranges.width > 0 && ranges.height > 0 && ranges.width != Mathf.Infinity && ranges.height != Mathf.Infinity)
            {
                settings.hRangeMin = ranges.xMin;
                settings.hRangeMax = ranges.xMax;
                settings.vRangeMin = ranges.yMin;
                settings.vRangeMax = ranges.yMax;
            }

            CurveEditorWindow.curve = new AnimationCurve();
            CurveEditorWindow.color = new Color(0, 0.8f, 0f);
            CurveEditorWindow.instance.Show(GUIView.current, settings);

            CurveEditorWindow.instance.currentPresetLibrary = libraryPath;
        }
        // Called by OnEnable to make sure the CurveEditor is not null,
        // and by Show so we get a fresh CurveEditor when the user clicks a new curve.
        void Init(CurveEditorSettings settings)
        {
            m_CurveEditor = new CurveEditor(GetCurveEditorRect(), GetCurveWrapperArray(), true);
            m_CurveEditor.curvesUpdated   = UpdateCurve;
            m_CurveEditor.scaleWithWindow = true;
            m_CurveEditor.margin          = 40;
            if (settings != null)
            {
                m_CurveEditor.settings = settings;
            }
            m_CurveEditor.settings.hTickLabelOffset   = 10;
            m_CurveEditor.settings.rectangleToolFlags = CurveEditorSettings.RectangleToolFlags.MiniRectangleTool;

            // As there is no guarantee animation curve changes are recorded in undo redo, we can't really
            // handle curve selection in undo redo either.
            m_CurveEditor.settings.undoRedoSelection = false;
            m_CurveEditor.settings.showWrapperPopups = true;

            // For each of horizontal and vertical axis, if we have a finite range for that axis, use that range,
            // otherwise use framing logic to determine shown range for that axis.
            bool frameH = true;
            bool frameV = true;

            if (m_CurveEditor.settings.hRangeMin != Mathf.NegativeInfinity && m_CurveEditor.settings.hRangeMax != Mathf.Infinity)
            {
                m_CurveEditor.SetShownHRangeInsideMargins(m_CurveEditor.settings.hRangeMin, m_CurveEditor.settings.hRangeMax);
                frameH = false;
            }
            if (m_CurveEditor.settings.vRangeMin != Mathf.NegativeInfinity && m_CurveEditor.settings.vRangeMax != Mathf.Infinity)
            {
                m_CurveEditor.SetShownVRangeInsideMargins(m_CurveEditor.settings.vRangeMin, m_CurveEditor.settings.vRangeMax);
                frameV = false;
            }

            m_CurveEditor.FrameSelected(frameH, frameV);

            titleContent = EditorGUIUtility.TrTextContent("Curve");

            // deal with window size
            minSize = new Vector2(240, 240 + kPresetsHeight);
            maxSize = new Vector2(10000, 10000);
        }
Beispiel #19
0
		private static void ShowCurvePopup(GUIView viewToUpdate, Rect ranges)
		{
			CurveEditorSettings curveEditorSettings = new CurveEditorSettings();
			if (ranges.width > 0f && ranges.height > 0f && ranges.width != float.PositiveInfinity && ranges.height != float.PositiveInfinity)
			{
				curveEditorSettings.hRangeMin = ranges.xMin;
				curveEditorSettings.hRangeMax = ranges.xMax;
				curveEditorSettings.vRangeMin = ranges.yMin;
				curveEditorSettings.vRangeMax = ranges.yMax;
			}
			CurveEditorWindow.instance.Show(GUIView.current, curveEditorSettings);
		}
 private void InitializeCurveEditor()
 {
   this.m_CurveEditor = new CurveEditor(new Rect(0.0f, 0.0f, this.contentWidth, 100f), new CurveWrapper[0], false);
   CurveEditorSettings curveEditorSettings = new CurveEditorSettings();
   curveEditorSettings.hTickStyle.distMin = 30;
   curveEditorSettings.hTickStyle.distFull = 80;
   curveEditorSettings.hTickStyle.distLabel = 0;
   if (EditorGUIUtility.isProSkin)
   {
     curveEditorSettings.vTickStyle.color = new Color(1f, 1f, 1f, curveEditorSettings.vTickStyle.color.a);
     curveEditorSettings.vTickStyle.labelColor = new Color(1f, 1f, 1f, curveEditorSettings.vTickStyle.labelColor.a);
   }
   curveEditorSettings.vTickStyle.distMin = 15;
   curveEditorSettings.vTickStyle.distFull = 40;
   curveEditorSettings.vTickStyle.distLabel = 30;
   curveEditorSettings.vTickStyle.stubs = true;
   curveEditorSettings.hRangeMin = 0.0f;
   curveEditorSettings.hRangeLocked = false;
   curveEditorSettings.vRangeLocked = false;
   curveEditorSettings.hSlider = true;
   curveEditorSettings.vSlider = true;
   this.m_CurveEditor.shownArea = new Rect(1f, 1f, 1f, 1f);
   this.m_CurveEditor.settings = curveEditorSettings;
   this.m_CurveEditor.m_PlayHead = (IPlayHead) this.m_State;
 }
 private void Init(CurveEditorSettings settings)
 {
     this.m_CurveEditor = new CurveEditor(this.GetCurveEditorRect(), this.GetCurveWrapperArray(), true);
     this.m_CurveEditor.curvesUpdated = new CurveEditor.CallbackFunction(this.UpdateCurve);
     this.m_CurveEditor.scaleWithWindow = true;
     this.m_CurveEditor.margin = 40f;
     if (settings != null)
     {
         this.m_CurveEditor.settings = settings;
     }
     this.m_CurveEditor.settings.hTickLabelOffset = 10f;
     this.m_CurveEditor.settings.rectangleToolFlags = CurveEditorSettings.RectangleToolFlags.MiniRectangleTool;
     this.m_CurveEditor.settings.undoRedoSelection = true;
     this.m_CurveEditor.settings.showWrapperPopups = true;
     bool horizontally = true;
     bool vertically = true;
     if ((this.m_CurveEditor.settings.hRangeMin != float.NegativeInfinity) && (this.m_CurveEditor.settings.hRangeMax != float.PositiveInfinity))
     {
         this.m_CurveEditor.SetShownHRangeInsideMargins(this.m_CurveEditor.settings.hRangeMin, this.m_CurveEditor.settings.hRangeMax);
         horizontally = false;
     }
     if ((this.m_CurveEditor.settings.vRangeMin != float.NegativeInfinity) && (this.m_CurveEditor.settings.vRangeMax != float.PositiveInfinity))
     {
         this.m_CurveEditor.SetShownVRangeInsideMargins(this.m_CurveEditor.settings.vRangeMin, this.m_CurveEditor.settings.vRangeMax);
         vertically = false;
     }
     this.m_CurveEditor.FrameSelected(horizontally, vertically);
 }
Beispiel #22
0
 private void InitializeCurveEditor()
 {
     this.m_CurveEditor = new CurveEditor(new Rect(0f, 0f, this.contentWidth, 100f), new CurveWrapper[0], false);
     CurveEditorSettings settings = new CurveEditorSettings {
         hTickStyle = { distMin = 30, distFull = 80, distLabel = 0 }
     };
     if (EditorGUIUtility.isProSkin)
     {
         settings.vTickStyle.color = new Color(1f, 1f, 1f, settings.vTickStyle.color.a);
         settings.vTickStyle.labelColor = new Color(1f, 1f, 1f, settings.vTickStyle.labelColor.a);
     }
     settings.vTickStyle.distMin = 15;
     settings.vTickStyle.distFull = 40;
     settings.vTickStyle.distLabel = 30;
     settings.vTickStyle.stubs = true;
     settings.hRangeMin = 0f;
     settings.hRangeLocked = false;
     settings.vRangeLocked = false;
     settings.hSlider = true;
     settings.vSlider = true;
     this.m_CurveEditor.shownArea = new Rect(1f, 1f, 1f, 1f);
     this.m_CurveEditor.settings = settings;
     this.m_CurveEditor.m_PlayHead = this.m_State;
 }
 public void Show(GUIView viewToUpdate, CurveEditorSettings settings)
 {
     this.delegateView = viewToUpdate;
     this.Init(settings);
     base.ShowAuxWindow();
     base.titleContent = new GUIContent("Curve");
     base.minSize = new Vector2(240f, 286f);
     base.maxSize = new Vector2(10000f, 10000f);
 }
 private static void ShowCurvePopup(GUIView viewToUpdate, Rect ranges)
 {
   CurveEditorSettings settings = new CurveEditorSettings();
   if ((double) ranges.width > 0.0 && (double) ranges.height > 0.0 && ((double) ranges.width != double.PositiveInfinity && (double) ranges.height != double.PositiveInfinity))
   {
     settings.hRangeMin = ranges.xMin;
     settings.hRangeMax = ranges.xMax;
     settings.vRangeMin = ranges.yMin;
     settings.vRangeMax = ranges.yMax;
   }
   CurveEditorWindow.instance.Show(GUIView.current, settings);
 }
		private void SetGridColors()
		{
			CurveEditorSettings curveEditorSettings = new CurveEditorSettings();
			curveEditorSettings.hTickStyle.distMin = 30;
			curveEditorSettings.hTickStyle.distFull = 80;
			curveEditorSettings.hTickStyle.distLabel = 0;
			if (EditorGUIUtility.isProSkin)
			{
				curveEditorSettings.vTickStyle.color = new Color(1f, 1f, 1f, curveEditorSettings.vTickStyle.color.a);
				curveEditorSettings.vTickStyle.labelColor = new Color(1f, 1f, 1f, curveEditorSettings.vTickStyle.labelColor.a);
			}
			curveEditorSettings.vTickStyle.distMin = 15;
			curveEditorSettings.vTickStyle.distFull = 40;
			curveEditorSettings.vTickStyle.distLabel = 30;
			curveEditorSettings.vTickStyle.stubs = true;
			curveEditorSettings.hRangeMin = 0f;
			curveEditorSettings.hRangeLocked = false;
			curveEditorSettings.vRangeLocked = false;
			this.m_CurveEditor.settings = curveEditorSettings;
		}
 private void Init(CurveEditorSettings settings)
 {
   this.m_CurveEditor = new CurveEditor(this.GetCurveEditorRect(), this.GetCurveWrapperArray(), true);
   this.m_CurveEditor.curvesUpdated = new CurveEditor.CallbackFunction(this.UpdateCurve);
   this.m_CurveEditor.scaleWithWindow = true;
   this.m_CurveEditor.margin = 40f;
   if (settings != null)
     this.m_CurveEditor.settings = settings;
   this.m_CurveEditor.settings.hTickLabelOffset = 10f;
   bool horizontally = true;
   bool vertically = true;
   if ((double) this.m_CurveEditor.settings.hRangeMin != double.NegativeInfinity && (double) this.m_CurveEditor.settings.hRangeMax != double.PositiveInfinity)
   {
     this.m_CurveEditor.SetShownHRangeInsideMargins(this.m_CurveEditor.settings.hRangeMin, this.m_CurveEditor.settings.hRangeMax);
     horizontally = false;
   }
   if ((double) this.m_CurveEditor.settings.vRangeMin != double.NegativeInfinity && (double) this.m_CurveEditor.settings.vRangeMax != double.PositiveInfinity)
   {
     this.m_CurveEditor.SetShownVRangeInsideMargins(this.m_CurveEditor.settings.vRangeMin, this.m_CurveEditor.settings.vRangeMax);
     vertically = false;
   }
   this.m_CurveEditor.FrameSelected(horizontally, vertically);
 }