Inheritance: NS004.c000068
        private void CreateTimeLine()
        {
            mMusicTime = new TimeLine(this.mCursor);
            mMusicTime.ScaleX = 19;


            mMusicTime.GuiChange += SetSongTimeFromTimeLine;

            AddWindow(mMusicTime);
            mMusicTime.X = mMusicTime.ScaleX + .5f;
            mMusicTime.Y = 10f;

            mMusicTime.SmallVerticalBarIncrement = 5;
            mMusicTime.VerticalBarIncrement = 25;
        }
Exemple #2
0
 public c00011e(c000069 p0)
     : base(p0)
 {
     float num = 0.5f;
     this.m000375(7f);
     this.m000376(6f);
     float num2 = 1f;
     this.f0008a1 = new TimeLine(p0);
     this.f0008a2 = new TimeLine(p0);
     this.f0008a3 = new TimeLine(p0);
     this.f0008a4 = new TimeLine(p0);
     this.m000097(this.f0008a1);
     this.m000097(this.f0008a2);
     this.m000097(this.f0008a3);
     this.m000097(this.f0008a4);
     this.f0008a1.m000254(num + 3.2f);
     this.f0008a2.m000254(num + 5.5f);
     this.f0008a3.m000254(num + 7.8f);
     this.f0008a4.m000254(num + 10.1f);
     this.f0008a1.m0003aa(new delegate06f(this.m0000a8));
     this.f0008a2.m0003aa(new delegate06f(this.m0000a8));
     this.f0008a3.m0003aa(new delegate06f(this.m0000a8));
     this.f0008a4.m0003aa(new delegate06f(this.m0000a8));
     this.f0008a1.m000356(true);
     this.f0008a2.m000356(false);
     this.f0008a3.m000356(false);
     this.f0008a4.m000356(false);
     this.f0008a1.m00039b(0.5);
     this.f0008a2.m00039b(0.5);
     this.f0008a3.m00039b(0.5);
     this.f0008a4.m00039b(0.5);
     this.f0008a1.m00039c(this.f0008a1.m000333() / 2.0);
     this.f0008a2.m00039c(this.f0008a2.m000333() / 2.0);
     this.f0008a3.m00039c(this.f0008a3.m000333() / 2.0);
     this.f0008a4.m00039c(this.f0008a4.m000333() / 2.0);
     this.f0008a1.m000340(1.0);
     this.f0008a2.m000340(1.0);
     this.f0008a3.m000340(1.0);
     this.f0008a4.m000340(1.0);
     this.f0008a1.m000257((this.m00008e() - num) - num2);
     this.f0008a2.m000257((this.m00008e() - num) - num2);
     this.f0008a3.m000257((this.m00008e() - num) - num2);
     this.f0008a4.m000257((this.m00008e() - num) - num2);
     this.f0008a1.m000143((num + (num2 * 2f)) + this.f0008a1.m000151());
     this.f0008a2.m000143((num + (num2 * 2f)) + this.f0008a2.m000151());
     this.f0008a3.m000143((num + (num2 * 2f)) + this.f0008a3.m000151());
     this.f0008a4.m000143((num + (num2 * 2f)) + this.f0008a4.m000151());
     this.f000018 = new c00007f(base.f000029);
     this.m000097(this.f000018);
     this.f000122 = new c00007f(base.f000029);
     this.m000097(this.f000122);
     this.f00089f = new c00007f(base.f000029);
     this.m000097(this.f00089f);
     this.f0008a0 = new c00007f(base.f000029);
     this.m000097(this.f0008a0);
     this.f000018.m000143(0.2f);
     this.f000122.m000143(0.2f);
     this.f00089f.m000143(0.2f);
     this.f0008a0.m000143(0.2f);
     this.f000018.m000080("A");
     this.f000122.m000080("R");
     this.f00089f.m000080("G");
     this.f0008a0.m000080("B");
     this.f000018.m000254(this.f0008a1.m000179());
     this.f000122.m000254(this.f0008a2.m000179());
     this.f00089f.m000254(this.f0008a3.m000179());
     this.f0008a0.m000254(this.f0008a4.m000179());
 }
        public ModelAnimationControlWindow(PositionedModel model)
            : base(GuiManager.Cursor)
        {
            // Set Window properties
            HasMoveBar = true;
            Resizable = true;
            HasCloseButton = true;
            
            // Set scaling
            ScaleX = 20f;

            // Add combo boxes
            mCurrentAnimation = new ComboBox(mCursor);
            AddWindow(mCurrentAnimation);

            mBlendAnimation = new ComboBox(mCursor);
            AddWindow(mBlendAnimation);

            mCurrentAnimation.ItemClick += new GuiMessage(mCurrentAnimation_ItemClick);
            mBlendAnimation.ItemClick += new GuiMessage(mBlendAnimation_ItemClick);

            // Add text
            mCurrentAnimationText = new TextDisplay(mCursor);
            AddWindow(mCurrentAnimationText);

            mBlendAnimationText = new TextDisplay(mCursor);
            AddWindow(mBlendAnimationText);

            mCurrentAnimationText.Text = "Current Animation";
            mBlendAnimationText.Text = "Blend Animation";

            // Blend controller
            mBlendController = new TimeLine(GuiManager.Cursor);
            this.AddWindow(mBlendController);
            mBlendController.ScaleX = 18f;
            mBlendController.MinimumValue = 0.0;
            mBlendController.MaximumValue = 1.0;
            mBlendController.Start = 0.0;
            mBlendController.ValueWidth = 1.0;
            mBlendController.VerticalBarIncrement = 0.1;
            mBlendController.CurrentValue = 0.0;
            mBlendController.GuiChange += new GuiMessage(mBlendController_onGUIChange);

            // Animation timings
            mAnimationTime = new TimeLine(GuiManager.Cursor);
            this.AddWindow(mAnimationTime);
            mAnimationTime.ScaleX = 9f;
            mAnimationTime.VerticalBarIncrement = 0.2;
            mAnimationTime.SmallVerticalBarIncrement = 0.1;
            mAnimationTime.ValueWidth = 1;
            mAnimationTime.GuiChange += new GuiMessage(mAnimationTime_onGUIChange);

            mBlendTime = new TimeLine(GuiManager.Cursor);
            this.AddWindow(mBlendTime);
            mBlendTime.ScaleX = 9f;
            mBlendTime.VerticalBarIncrement = 0.2;
            mBlendTime.SmallVerticalBarIncrement = 0.1;
            mBlendTime.ValueWidth = 1;
            mBlendTime.GuiChange += new GuiMessage(mBlendTime_onGUIChange);

            // Animation speeds
            mAnimationSpeed = new TimeLine(GuiManager.Cursor);
            this.AddWindow(mAnimationSpeed);
            mAnimationSpeed.ScaleX = 9f;
            mAnimationSpeed.MinimumValue = 0.0;
            mAnimationSpeed.MaximumValue = 2.0;
            mAnimationSpeed.Start = 0.0;
            mAnimationSpeed.ValueWidth = 2.0;
            mAnimationSpeed.VerticalBarIncrement = 0.5;
            mAnimationSpeed.SmallVerticalBarIncrement = 0.1;
            mAnimationSpeed.CurrentValue = 1.0;
            mAnimationSpeed.GuiChange += new GuiMessage(mAnimationSpeed_onGUIChange);

            mBlendSpeed = new TimeLine(GuiManager.Cursor);
            this.AddWindow(mBlendSpeed);
            mBlendSpeed.ScaleX = 9f;
            mBlendSpeed.MinimumValue = 0.0;
            mBlendSpeed.MaximumValue = 2.0;
            mBlendSpeed.Start = 0.0;
            mBlendSpeed.ValueWidth = 2.0;
            mBlendSpeed.VerticalBarIncrement = 0.5;
            mBlendSpeed.SmallVerticalBarIncrement = 0.1;
            mBlendSpeed.CurrentValue = 1.0;
            mBlendSpeed.GuiChange += new GuiMessage(mBlendSpeed_onGUIChange);

            mAnimationStopStart = new Button(GuiManager.Cursor);
            this.AddWindow(mAnimationStopStart);
            mAnimationStopStart.ScaleX = 5f;
            mAnimationStopStart.Text = "Stop";
            mAnimationStopStart.Click += new GuiMessage(mAnimationStopStart_Click);

            // Set scaling
            mCurrentAnimation.ScaleX = 9f;
            mBlendAnimation.ScaleX = 9f;
            mCurrentAnimationText.ScaleY = 1f;// mCurrentAnimation.ScaleY;
            mCurrentAnimationText.ScaleX = mCurrentAnimation.ScaleX;
            mBlendAnimationText.ScaleY = 1f;// mBlendAnimation.ScaleY;
            mBlendAnimationText.ScaleX = mBlendAnimation.ScaleX;

            ScaleY = mCurrentAnimationText.ScaleY + mCurrentAnimation.ScaleY +
                2f * mBlendController.ScaleY + 2f * mAnimationTime.ScaleY +
                2f * mAnimationSpeed.ScaleY + 2f * mAnimationStopStart.ScaleY +
                .5f;
            ScaleX = (mCurrentAnimation.ScaleX + mBlendAnimation.ScaleX) + 4.5f / 2f;

            PositionUIElements();

            Resizing += new GuiMessage(AnimationEditor_Resizing);

            // Add model
            PositionedModel = model;
        }
Exemple #4
0
        public ColorDisplay(Cursor cursor)
            : base(cursor)
        {
            float border = .5f;

            this.ScaleX = 7f;
            this.ScaleY = 6f;

            float spaceForDisplay = 1;


            #region Create the sliders

            mASlider = new TimeLine(cursor);
            mRSlider = new TimeLine(cursor);
            mGSlider = new TimeLine(cursor);
            mBSlider = new TimeLine(cursor);

            AddWindow(mASlider);
            AddWindow(mRSlider);
            AddWindow(mGSlider);
            AddWindow(mBSlider);

            mASlider.Y = border + 3.2f;
            mRSlider.Y = border + 5.5f;
            mGSlider.Y = border + 7.8f;
            mBSlider.Y = border + 10.1f;

            mASlider.GuiChange += OnSliderValueChanged;
            mRSlider.GuiChange += OnSliderValueChanged;
            mGSlider.GuiChange += OnSliderValueChanged;
            mBSlider.GuiChange += OnSliderValueChanged;

            // Since the ranges are identical don't show them for
            // all sliders, just the top.
            mASlider.ShowValues = true;
            mRSlider.ShowValues = false;
            mGSlider.ShowValues = false;
            mBSlider.ShowValues = false;

            mASlider.VerticalBarIncrement = .5f * FlatRedBall.Graphics.GraphicalEnumerations.MaxColorComponentValue;
            mRSlider.VerticalBarIncrement = .5f * FlatRedBall.Graphics.GraphicalEnumerations.MaxColorComponentValue;
            mGSlider.VerticalBarIncrement = .5f * FlatRedBall.Graphics.GraphicalEnumerations.MaxColorComponentValue;
            mBSlider.VerticalBarIncrement = .5f * FlatRedBall.Graphics.GraphicalEnumerations.MaxColorComponentValue;

            mASlider.SmallVerticalBarIncrement = mASlider.VerticalBarIncrement / 2.0f;
            mRSlider.SmallVerticalBarIncrement = mRSlider.VerticalBarIncrement / 2.0f;
            mGSlider.SmallVerticalBarIncrement = mGSlider.VerticalBarIncrement / 2.0f;
            mBSlider.SmallVerticalBarIncrement = mBSlider.VerticalBarIncrement / 2.0f;


            mASlider.ValueWidth = FlatRedBall.Graphics.GraphicalEnumerations.MaxColorComponentValue;
            mRSlider.ValueWidth = FlatRedBall.Graphics.GraphicalEnumerations.MaxColorComponentValue;
            mGSlider.ValueWidth = FlatRedBall.Graphics.GraphicalEnumerations.MaxColorComponentValue;
            mBSlider.ValueWidth = FlatRedBall.Graphics.GraphicalEnumerations.MaxColorComponentValue;

            mASlider.ScaleX = this.ScaleX - border - spaceForDisplay;
            mRSlider.ScaleX = this.ScaleX - border - spaceForDisplay;
            mGSlider.ScaleX = this.ScaleX - border - spaceForDisplay;
            mBSlider.ScaleX = this.ScaleX - border - spaceForDisplay;

            mASlider.X = border + spaceForDisplay * 2 + mASlider.ScaleX;
            mRSlider.X = border + spaceForDisplay * 2 + mRSlider.ScaleX;
            mGSlider.X = border + spaceForDisplay * 2 + mGSlider.ScaleX;
            mBSlider.X = border + spaceForDisplay * 2 + mBSlider.ScaleX;




            #endregion

            #region Create the TextDisplays
            mADisplay = new TextDisplay(mCursor);
            AddWindow(mADisplay);

            mRDisplay = new TextDisplay(mCursor);
            AddWindow(mRDisplay);

            mGDisplay = new TextDisplay(mCursor);
            AddWindow(mGDisplay);

            mBDisplay = new TextDisplay(mCursor);
            AddWindow(mBDisplay);

            mADisplay.X = .2f;
            mRDisplay.X = .2f;
            mGDisplay.X = .2f;
            mBDisplay.X = .2f;

            mADisplay.Text = "A";
            mRDisplay.Text = "R";
            mGDisplay.Text = "G";
            mBDisplay.Text = "B";

            mADisplay.Y = mASlider.Y;
            mRDisplay.Y = mRSlider.Y;
            mGDisplay.Y = mGSlider.Y;
            mBDisplay.Y = mBSlider.Y;
            #endregion

        }
        public ColorDisplay(Cursor cursor)
            : base(cursor)
        {
            float border = .5f;

            this.ScaleX = 7f;
            this.ScaleY = 6f;

            float spaceForDisplay = 1;


            #region Create the sliders

            mASlider = new TimeLine(cursor);
            mRSlider = new TimeLine(cursor);
            mGSlider = new TimeLine(cursor);
            mBSlider = new TimeLine(cursor);

            AddWindow(mASlider);
            AddWindow(mRSlider);
            AddWindow(mGSlider);
            AddWindow(mBSlider);

            mASlider.Y = border + 3.2f;
            mRSlider.Y = border + 5.5f;
            mGSlider.Y = border + 7.8f;
            mBSlider.Y = border + 10.1f;

            mASlider.GuiChange += OnSliderValueChanged;
            mRSlider.GuiChange += OnSliderValueChanged;
            mGSlider.GuiChange += OnSliderValueChanged;
            mBSlider.GuiChange += OnSliderValueChanged;

            // Since the ranges are identical don't show them for
            // all sliders, just the top.
            mASlider.ShowValues = true;
            mRSlider.ShowValues = false;
            mGSlider.ShowValues = false;
            mBSlider.ShowValues = false;

            mASlider.VerticalBarIncrement = .5f * FlatRedBall.Graphics.GraphicalEnumerations.MaxColorComponentValue;
            mRSlider.VerticalBarIncrement = .5f * FlatRedBall.Graphics.GraphicalEnumerations.MaxColorComponentValue;
            mGSlider.VerticalBarIncrement = .5f * FlatRedBall.Graphics.GraphicalEnumerations.MaxColorComponentValue;
            mBSlider.VerticalBarIncrement = .5f * FlatRedBall.Graphics.GraphicalEnumerations.MaxColorComponentValue;

            mASlider.SmallVerticalBarIncrement = mASlider.VerticalBarIncrement / 2.0f;
            mRSlider.SmallVerticalBarIncrement = mRSlider.VerticalBarIncrement / 2.0f;
            mGSlider.SmallVerticalBarIncrement = mGSlider.VerticalBarIncrement / 2.0f;
            mBSlider.SmallVerticalBarIncrement = mBSlider.VerticalBarIncrement / 2.0f;


            mASlider.ValueWidth = FlatRedBall.Graphics.GraphicalEnumerations.MaxColorComponentValue;
            mRSlider.ValueWidth = FlatRedBall.Graphics.GraphicalEnumerations.MaxColorComponentValue;
            mGSlider.ValueWidth = FlatRedBall.Graphics.GraphicalEnumerations.MaxColorComponentValue;
            mBSlider.ValueWidth = FlatRedBall.Graphics.GraphicalEnumerations.MaxColorComponentValue;

            mASlider.ScaleX = this.ScaleX - border - spaceForDisplay;
            mRSlider.ScaleX = this.ScaleX - border - spaceForDisplay;
            mGSlider.ScaleX = this.ScaleX - border - spaceForDisplay;
            mBSlider.ScaleX = this.ScaleX - border - spaceForDisplay;

            mASlider.X = border + spaceForDisplay * 2 + mASlider.ScaleX;
            mRSlider.X = border + spaceForDisplay * 2 + mRSlider.ScaleX;
            mGSlider.X = border + spaceForDisplay * 2 + mGSlider.ScaleX;
            mBSlider.X = border + spaceForDisplay * 2 + mBSlider.ScaleX;



            #endregion

            #region Create the TextDisplays
            mADisplay = new TextDisplay(mCursor);
            AddWindow(mADisplay);

            mRDisplay = new TextDisplay(mCursor);
            AddWindow(mRDisplay);

            mGDisplay = new TextDisplay(mCursor);
            AddWindow(mGDisplay);

            mBDisplay = new TextDisplay(mCursor);
            AddWindow(mBDisplay);

            mADisplay.X = .2f;
            mRDisplay.X = .2f;
            mGDisplay.X = .2f;
            mBDisplay.X = .2f;

            mADisplay.Text = "A";
            mRDisplay.Text = "R";
            mGDisplay.Text = "G";
            mBDisplay.Text = "B";

            mADisplay.Y = mASlider.Y;
            mRDisplay.Y = mRSlider.Y;
            mGDisplay.Y = mGSlider.Y;
            mBDisplay.Y = mBSlider.Y;
            #endregion
        }