UnityEditor.CurveEditorWindow.Init C# (CSharp) Method

Init() private method

private Init ( CurveEditorSettings settings ) : void
settings CurveEditorSettings
return void
        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);
        }