Example #1
0
        private unsafe void CreateCurveEditor()
        {
            GKeyLimit gKeyLimit = 1f;

            *(ref gKeyLimit + 4) = this.MinValue;
            *(ref gKeyLimit + 8) = this.MaxValue;
            int curveType = this.CurveType;

            if (curveType != 0)
            {
                if (curveType != 1)
                {
                    if (curveType == 2)
                    {
                        this.curveeditor = new NCurveEditor(< Module >.GEditorWorld.GetCameraCurveRollCurve(this.propWorld, this.CurveIndex), ref gKeyLimit);
                    }
                }
                else
                {
                    this.curveeditor = new NCurveEditor(< Module >.GEditorWorld.GetCameraCurveFOVCurve(this.propWorld, this.CurveIndex), ref gKeyLimit);
                }
            }
            else
            {
                this.curveeditor = new NCurveEditor(< Module >.GEditorWorld.GetCameraCurveTimeCurve(this.propWorld, this.CurveIndex), ref gKeyLimit);
            }
            base.SuspendLayout();
            base.Controls.Add(this.curveeditor);
            base.ResumeLayout(false);
            this.curveeditor.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
        }
        private void UpdateButtons()
        {
            int selectedLayer = this.GetSelectedLayer();

            if (selectedLayer != 0 && selectedLayer < < Module >.GEditorWorld.GetNumOfTileLayers(this.WorldP) - 1)
            {
                this.UpBtn.Enabled = true;
            }
            else
            {
                this.UpBtn.Enabled = false;
            }
            if (selectedLayer > 1 && selectedLayer < < Module >.GEditorWorld.GetNumOfTileLayers(this.WorldP))
            {
                this.DownBtn.Enabled = true;
            }
            else
            {
                this.DownBtn.Enabled = false;
            }
            if (selectedLayer < < Module >.GEditorWorld.GetNumOfTileLayers(this.WorldP) && < Module >.GEditorWorld.GetNumOfTileLayers(this.WorldP) >= 2)
            {
                this.DeleteBtn.Enabled = true;
            }