Exemplo n.º 1
0
        protected override void Update(GameTime gameTime)
        {
            KeyboardState CurrKeys  = Keyboard.GetState();
            MouseState    CurrMouse = Mouse.GetState();
            GamePadState  CurrPad   = GamePad.GetState(PlayerIndex.One);
            int           nHeightDiff;

            int Ctr;

            //Process keyboard input
            if ((CurrKeys.IsKeyDown(Keys.OemTilde) == true) && (cPriorKeyState.IsKeyDown(Keys.OemTilde) == false))
            {
                cDevConsole.ToggleVisible();
            }

            if (CurrKeys.IsKeyDown(Keys.W) == true)
            {
                if (cLeftPaddleControl == PaddleInput.KeysWASD)
                {
                    MoveRightPaddle(-1 * PADDLE_MAXSPEED);
                }

                if (cRightPaddleControl == PaddleInput.KeysWASD)
                {
                    MoveRightPaddle(-1 * PADDLE_MAXSPEED);
                }
            }

            if (CurrKeys.IsKeyDown(Keys.S) == true)
            {
                if (cLeftPaddleControl == PaddleInput.KeysWASD)
                {
                    MoveRightPaddle(PADDLE_MAXSPEED);
                }

                if (cRightPaddleControl == PaddleInput.KeysWASD)
                {
                    MoveRightPaddle(PADDLE_MAXSPEED);
                }
            }

            if (CurrKeys.IsKeyDown(Keys.Up) == true)
            {
                if (cLeftPaddleControl == PaddleInput.KeysArrows)
                {
                    MoveLeftPaddle(-1 * PADDLE_MAXSPEED);
                }

                if (cRightPaddleControl == PaddleInput.KeysArrows)
                {
                    MoveRightPaddle(-1 * PADDLE_MAXSPEED);
                }
            }

            if (CurrKeys.IsKeyDown(Keys.Down) == true)
            {
                if (cLeftPaddleControl == PaddleInput.KeysArrows)
                {
                    MoveLeftPaddle(PADDLE_MAXSPEED);
                }

                if (cRightPaddleControl == PaddleInput.KeysArrows)
                {
                    MoveRightPaddle(PADDLE_MAXSPEED);
                }
            }

            //Process mouse input
            if (cLeftPaddleControl == PaddleInput.Mouse)
            {
                nHeightDiff = (int)(CurrMouse.Position.Y - cLeftPaddle.GetCenterCoordinates().Y);

                MoveLeftPaddle(nHeightDiff);
            }

            if (cRightPaddleControl == PaddleInput.Mouse)
            {
                nHeightDiff = (int)(CurrMouse.Position.Y - cRightPaddle.GetCenterCoordinates().Y);

                MoveRightPaddle(nHeightDiff);
            }

            //Process gamepad input
            if (CurrPad.IsConnected == true)
            {
                if (CurrPad.IsButtonDown(Buttons.DPadUp) == true)
                {
                    if (cLeftPaddleControl == PaddleInput.PadDPad)
                    {
                        MoveLeftPaddle(-1 * PADDLE_MAXSPEED);
                    }

                    if (cRightPaddleControl == PaddleInput.PadDPad)
                    {
                        MoveRightPaddle(-1 * PADDLE_MAXSPEED);
                    }
                }

                if (CurrPad.IsButtonDown(Buttons.DPadDown) == true)
                {
                    if (cLeftPaddleControl == PaddleInput.PadDPad)
                    {
                        MoveLeftPaddle(PADDLE_MAXSPEED);
                    }

                    if (cRightPaddleControl == PaddleInput.PadDPad)
                    {
                        MoveRightPaddle(PADDLE_MAXSPEED);
                    }
                }

                if (cLeftPaddleControl == PaddleInput.PadLStick)
                {
                    nHeightDiff = (int)(PADDLE_MAXSPEED * CurrPad.ThumbSticks.Left.Y);                     //Thumbsticks give values of -1 to 1

                    MoveLeftPaddle(nHeightDiff);
                }

                if (cRightPaddleControl == PaddleInput.PadLStick)
                {
                    nHeightDiff = (int)(PADDLE_MAXSPEED * CurrPad.ThumbSticks.Left.Y);                     //Thumbsticks give values of -1 to 1

                    MoveRightPaddle(nHeightDiff);
                }

                if (cLeftPaddleControl == PaddleInput.PadRStick)
                {
                    nHeightDiff = (int)(PADDLE_MAXSPEED * CurrPad.ThumbSticks.Right.Y);                     //Thumbsticks give values of -1 to 1

                    MoveLeftPaddle(nHeightDiff);
                }

                if (cRightPaddleControl == PaddleInput.PadRStick)
                {
                    nHeightDiff = (int)(PADDLE_MAXSPEED * CurrPad.ThumbSticks.Right.Y);                     //Thumbsticks give values of -1 to 1

                    MoveRightPaddle(nHeightDiff);
                }
            }

            //Computer controlled paddle
            if (cLeftPaddleControl == PaddleInput.Computer)
            {
                nHeightDiff = (int)(cBall.GetCenterCoordinates().Y - cLeftPaddle.GetCenterCoordinates().Y);

                MoveLeftPaddle(nHeightDiff);
            }

            if (cRightPaddleControl == PaddleInput.Computer)
            {
                nHeightDiff = (int)(cBall.GetCenterCoordinates().Y - cRightPaddle.GetCenterCoordinates().Y);

                MoveRightPaddle(nHeightDiff);
            }

            //Allow all interface objects to update
            cDevConsole.Update(gameTime, CurrKeys, CurrMouse);

            for (Ctr = 0; Ctr < cBoundaryBars.Length; Ctr++)
            {
                cBoundaryBars[Ctr].Update(gameTime);
            }

            cBall.Update(gameTime);
            MoveBall();

            cLeftPaddle.Update(gameTime);
            cRightPaddle.Update(gameTime);

            cLeftPaddleInputBtn.Text = EnumTools.GetEnumDescriptionAttribute(cLeftPaddleControl);
            cLeftPaddleInputBtn.Update(gameTime, CurrKeys, CurrMouse);

            cRightPaddleInputBtn.Text = EnumTools.GetEnumDescriptionAttribute(cRightPaddleControl);
            cRightPaddleInputBtn.Update(gameTime, CurrKeys, CurrMouse);

            cScoreLbl.Update(gameTime);

            //Update input tracking values
            cPriorKeyState   = CurrKeys;
            cPriorMouseState = CurrMouse;
            cPriorPadState   = CurrPad;

            //Use monogame update
            base.Update(gameTime);
        }
Exemplo n.º 2
0
        protected override void LoadContent()
        {
            string          FileToLoad;
            Texture2D       TextureImage;
            CollisionRegion NewCollide = new CollisionRegion();
            int             Ctr;

            cDrawBatch = new SpriteBatch(cGraphDevMgr.GraphicsDevice);

            //Load all texture files
            foreach (Textures CurrTexture in Enum.GetValues(typeof(Textures)))
            {
                FileToLoad = String.Format("{0}{1}{2}", CONTENT_PATH, Path.DirectorySeparatorChar, EnumTools.GetEnumDescriptionAttribute(CurrTexture));

                TextureImage = Texture2D.FromStream(cGraphDevMgr.GraphicsDevice, File.OpenRead(FileToLoad));

                cTextureDict.Add(CurrTexture, TextureImage);
            }

            //Create drawing objects
            cFont                    = new TextureFont(cTextureDict[Textures.Font]);
            cDevConsole              = new GameConsole(cGraphDevMgr.GraphicsDevice, cFont, cGraphDevMgr.GraphicsDevice.Viewport.Bounds.Width, cGraphDevMgr.GraphicsDevice.Viewport.Bounds.Height / 2);
            cDevConsole.CommandSent += ConsoleCommandHandler;
            cDevConsole.OpenEffect   = DisplayEffect.SlideDown;
            cDevConsole.CloseEffect  = DisplayEffect.SlideUp;

            //Create interface controls
            TextureImage = new Texture2D(cGraphDevMgr.GraphicsDevice, 1, 1);
            TextureImage.SetData(new[] { Color.Transparent });

            cLeftPaddleInputBtn                 = new Button(cGraphDevMgr.GraphicsDevice, TextureImage, 0, 0, 50, 200);
            cLeftPaddleInputBtn.Visible         = true;
            cLeftPaddleInputBtn.Font            = cFont;
            cLeftPaddleInputBtn.FontSize        = 15;
            cLeftPaddleInputBtn.FontColor       = Color.Orange;
            cLeftPaddleInputBtn.SendMouseEvents = true;
            cLeftPaddleInputBtn.MouseEnter     += PaddleInputBtnMouseEnter;
            cLeftPaddleInputBtn.MouseLeave     += PaddleInputBtnMouseLeave;
            cLeftPaddleInputBtn.MouseUp        += LeftPaddleInputBtnCLick;

            cRightPaddleInputBtn                 = new Button(cGraphDevMgr.GraphicsDevice, TextureImage, 0, cGraphDevMgr.GraphicsDevice.Viewport.Width - 200, 50, 200);
            cRightPaddleInputBtn.Visible         = true;
            cRightPaddleInputBtn.Font            = cFont;
            cRightPaddleInputBtn.FontSize        = 15;
            cRightPaddleInputBtn.FontColor       = Color.LightBlue;
            cRightPaddleInputBtn.SendMouseEvents = true;
            cRightPaddleInputBtn.MouseEnter     += PaddleInputBtnMouseEnter;
            cRightPaddleInputBtn.MouseLeave     += PaddleInputBtnMouseLeave;
            cRightPaddleInputBtn.MouseUp        += RightPaddleInputBtnCLick;

            cScoreLbl           = new Button(cGraphDevMgr.GraphicsDevice, TextureImage, 0, cLeftPaddleInputBtn.Top + cLeftPaddleInputBtn.Width, 50, cGraphDevMgr.GraphicsDevice.Viewport.Width - cLeftPaddleInputBtn.Width - cRightPaddleInputBtn.Width);
            cScoreLbl.Text      = "0 - 0";
            cScoreLbl.Font      = cFont;
            cScoreLbl.FontSize  = 20;
            cScoreLbl.FontColor = Color.AntiqueWhite;
            cScoreLbl.Visible   = true;

            //Create the boundary bars (0 = top, 1 = bottom, 2&3 could be left and right?)
            for (Ctr = 0; Ctr < cBoundaryBars.Length; Ctr++)
            {
                cBoundaryBars[Ctr]                 = new GameObject(cGraphDevMgr.GraphicsDevice, 10, cGraphDevMgr.GraphicsDevice.Viewport.Bounds.Width);
                cBoundaryBars[Ctr].Left            = 0;
                cBoundaryBars[Ctr].Height          = 20;
                cBoundaryBars[Ctr].BackgroundColor = Color.White;
                cBoundaryBars[Ctr].Visible         = true;

                NewCollide.Type               = CollideType.Rectangle;
                NewCollide.Origin             = cBoundaryBars[Ctr].GetCenterCoordinates();
                NewCollide.RectOffsets.X      = (int)(NewCollide.Origin.X * -1);
                NewCollide.RectOffsets.Y      = -1 * (cBoundaryBars[Ctr].Height / 2);
                NewCollide.RectOffsets.Width  = cBoundaryBars[Ctr].Width;
                NewCollide.RectOffsets.Height = cBoundaryBars[Ctr].Height;

                cBoundaryBars[Ctr].AddCollisionRegion(NewCollide);
            }

            cBoundaryBars[0].Top = 50;
            cBoundaryBars[1].Top = cGraphDevMgr.GraphicsDevice.Viewport.Bounds.Height - cBoundaryBars[1].Height;

            //Create the ball
            cBall            = new GameObject(cGraphDevMgr.GraphicsDevice, 75);
            cBall.Top        = (int)((cGraphDevMgr.GraphicsDevice.Viewport.Bounds.Height / 2) - cBall.GetCenterCoordinates().Y);
            cBall.Left       = (int)((cGraphDevMgr.GraphicsDevice.Viewport.Bounds.Width / 2) - cBall.GetCenterCoordinates().X);
            cBall.Visible    = true;
            cBall.Background = cTextureDict[Textures.Circle];

            NewCollide.Type   = CollideType.Circle;
            NewCollide.Origin = cBall.GetCenterCoordinates();
            NewCollide.Radius = cBall.Width / 2;

            cBall.AddCollisionRegion(NewCollide);

            //Create the paddles
            cLeftPaddle                 = new GameObject(cGraphDevMgr.GraphicsDevice, 150, 20);
            cLeftPaddle.Top             = (cGraphDevMgr.GraphicsDevice.Viewport.Height / 2) - (cLeftPaddle.Height / 2);
            cLeftPaddle.Left            = 20;
            cLeftPaddle.Visible         = true;
            cLeftPaddle.BackgroundColor = Color.Orange;

            NewCollide.Type               = CollideType.Rectangle;
            NewCollide.Origin             = cLeftPaddle.GetCenterCoordinates();
            NewCollide.RectOffsets.X      = -1 * cLeftPaddle.Width / 2;
            NewCollide.RectOffsets.Y      = -1 * cLeftPaddle.Height / 2;
            NewCollide.RectOffsets.Width  = cLeftPaddle.Width;
            NewCollide.RectOffsets.Height = cLeftPaddle.Height;
            cLeftPaddle.AddCollisionRegion(NewCollide);

            cRightPaddle                 = new GameObject(cGraphDevMgr.GraphicsDevice, 150, 20);
            cRightPaddle.Top             = (cGraphDevMgr.GraphicsDevice.Viewport.Height / 2) - (cRightPaddle.Height / 2);
            cRightPaddle.Left            = cGraphDevMgr.GraphicsDevice.Viewport.Width - cRightPaddle.Width - 20;
            cRightPaddle.Visible         = true;
            cRightPaddle.BackgroundColor = Color.LightBlue;

            NewCollide.Type               = CollideType.Rectangle;
            NewCollide.Origin             = cRightPaddle.GetCenterCoordinates();
            NewCollide.RectOffsets.X      = -1 * cRightPaddle.Width / 2;
            NewCollide.RectOffsets.Y      = -1 * cRightPaddle.Height / 2;
            NewCollide.RectOffsets.Width  = cRightPaddle.Width;
            NewCollide.RectOffsets.Height = cRightPaddle.Height;
            cRightPaddle.AddCollisionRegion(NewCollide);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Load all external content files that are needed
        /// </summary>
        protected override void LoadContent()
        {
            String      strFileName;
            Texture2D   NewTexture;
            TextureFont Font = new TextureFont();
            FileStream  FileLoad;

            strFileName      = INTERFACECONTENTDIR + "\\Font.png";
            FileLoad         = new FileStream(strFileName, FileMode.Open);
            NewTexture       = Texture2D.FromStream(cGraphDevMgr.GraphicsDevice, FileLoad);
            Font.FontTexture = NewTexture;
            FileLoad.Close();

            try {
                cDevConsole              = new GameConsole(cGraphDevMgr.GraphicsDevice, Content, INTERFACECONTENTDIR + "\\Font.png", cGraphDevMgr.GraphicsDevice.Viewport.Width, cGraphDevMgr.GraphicsDevice.Viewport.Height / 2);
                cDevConsole.AccessKey    = Keys.OemTilde;
                cDevConsole.UseAccessKey = true;
                cDevConsole.OpenEffect   = DisplayEffect.SlideDown;
                cDevConsole.CloseEffect  = DisplayEffect.SlideUp;
                cDevConsole.CommandSent += new CommandSentEventHandler(ConsoleCommandHandler);
            } catch (Exception ExErr) {
                System.Windows.Forms.MessageBox.Show("Failed to initialize console: " + ExErr.GetType().ToString() + " - " + ExErr.Message);
                Exit();
                return;
            }

            cSettingsCont                 = new MDLN.MGTools.Container(GraphicsDevice, GraphicsDevice.Viewport.Height, 300);
            cSettingsCont.Width           = 300;
            cSettingsCont.Height          = GraphicsDevice.Viewport.Height;
            cSettingsCont.Visible         = true;
            cSettingsCont.BackgroundColor = new Color(Color.White, 0.5f);
            cSettingsCont.Top             = 0;
            cSettingsCont.Left            = 0;

            cShowingLbl                 = new Button(GraphicsDevice, null, 10, 10, 20, 280);
            cShowingLbl.Text            = "";
            cShowingLbl.Visible         = true;
            cShowingLbl.Font            = Font;
            cShowingLbl.BackgroundColor = Color.Transparent;
            cShowingLbl.FontColor       = LBLTEXTCOLOR;

            cAddParitclesBtn                 = new Button(GraphicsDevice, null, 40, 10, 20, 280);
            cAddParitclesBtn.Text            = "Add Particles";
            cAddParitclesBtn.Visible         = true;
            cAddParitclesBtn.Font            = Font;
            cAddParitclesBtn.BackgroundColor = Color.LightGray;
            cAddParitclesBtn.FontColor       = Color.Black;
            cAddParitclesBtn.Click          += AddParticlesClickHandler;

            cNumParticlesLbl                 = new Button(GraphicsDevice, null, 70, 10, 20, 105);
            cNumParticlesLbl.Text            = "Add Amount";
            cNumParticlesLbl.Visible         = true;
            cNumParticlesLbl.Font            = Font;
            cNumParticlesLbl.BackgroundColor = Color.Transparent;
            cNumParticlesLbl.FontColor       = LBLTEXTCOLOR;

            cNumParticlesTxt                 = new TextBox(GraphicsDevice, null, 70, 125, 20, 165);
            cNumParticlesTxt.Text            = "1";
            cNumParticlesTxt.Visible         = true;
            cNumParticlesTxt.Font            = Font;
            cNumParticlesTxt.BackgroundColor = Color.Black;
            cNumParticlesTxt.FontColor       = Color.White;
            cNumParticlesTxt.Alignment       = Justify.MiddleCenter;

            cHeightLbl                 = new Button(GraphicsDevice, null, 100, 10, 20, 90);
            cHeightLbl.Text            = "Height";
            cHeightLbl.Visible         = true;
            cHeightLbl.Font            = Font;
            cHeightLbl.BackgroundColor = Color.Transparent;
            cHeightLbl.FontColor       = LBLTEXTCOLOR;

            cHeightMinTxt                 = new TextBox(GraphicsDevice, null, 100, 100, 20, 90);
            cHeightMinTxt.Text            = "64";
            cHeightMinTxt.Visible         = true;
            cHeightMinTxt.Font            = Font;
            cHeightMinTxt.BackgroundColor = Color.Black;
            cHeightMinTxt.FontColor       = Color.White;
            cHeightMinTxt.Alignment       = Justify.MiddleCenter;

            cHeightMaxTxt                 = new TextBox(GraphicsDevice, null, 100, 200, 20, 90);
            cHeightMaxTxt.Text            = "64";
            cHeightMaxTxt.Visible         = true;
            cHeightMaxTxt.Font            = Font;
            cHeightMaxTxt.BackgroundColor = Color.Black;
            cHeightMaxTxt.FontColor       = Color.White;
            cHeightMaxTxt.Alignment       = Justify.MiddleCenter;

            cWidthLbl                 = new Button(GraphicsDevice, null, 130, 10, 20, 90);
            cWidthLbl.Text            = "Width";
            cWidthLbl.Visible         = true;
            cWidthLbl.Font            = Font;
            cWidthLbl.BackgroundColor = Color.Transparent;
            cWidthLbl.FontColor       = LBLTEXTCOLOR;

            cWidthMinTxt                 = new TextBox(GraphicsDevice, null, 130, 100, 20, 90);
            cWidthMinTxt.Text            = "64";
            cWidthMinTxt.Visible         = true;
            cWidthMinTxt.Font            = Font;
            cWidthMinTxt.BackgroundColor = Color.Black;
            cWidthMinTxt.FontColor       = Color.White;
            cWidthMinTxt.Alignment       = Justify.MiddleCenter;

            cWidthMaxTxt                 = new TextBox(GraphicsDevice, null, 130, 200, 20, 90);
            cWidthMaxTxt.Text            = "64";
            cWidthMaxTxt.Visible         = true;
            cWidthMaxTxt.Font            = Font;
            cWidthMaxTxt.BackgroundColor = Color.Black;
            cWidthMaxTxt.FontColor       = Color.White;
            cWidthMaxTxt.Alignment       = Justify.MiddleCenter;

            cRedLbl                 = new Button(GraphicsDevice, null, 160, 10, 20, 90);
            cRedLbl.Text            = "Red";
            cRedLbl.Visible         = true;
            cRedLbl.Font            = Font;
            cRedLbl.BackgroundColor = Color.Transparent;
            cRedLbl.FontColor       = LBLTEXTCOLOR;

            cRedMinTxt                 = new TextBox(GraphicsDevice, null, 160, 100, 20, 90);
            cRedMinTxt.Text            = "0";
            cRedMinTxt.Visible         = true;
            cRedMinTxt.Font            = Font;
            cRedMinTxt.BackgroundColor = Color.Black;
            cRedMinTxt.FontColor       = Color.White;
            cRedMinTxt.Alignment       = Justify.MiddleCenter;

            cRedMaxTxt                 = new TextBox(GraphicsDevice, null, 160, 200, 20, 90);
            cRedMaxTxt.Text            = "255";
            cRedMaxTxt.Visible         = true;
            cRedMaxTxt.Font            = Font;
            cRedMaxTxt.BackgroundColor = Color.Black;
            cRedMaxTxt.FontColor       = Color.White;
            cRedMaxTxt.Alignment       = Justify.MiddleCenter;

            cGreenLbl                 = new Button(GraphicsDevice, null, 190, 10, 20, 90);
            cGreenLbl.Text            = "Green";
            cGreenLbl.Visible         = true;
            cGreenLbl.Font            = Font;
            cGreenLbl.BackgroundColor = Color.Transparent;
            cGreenLbl.FontColor       = LBLTEXTCOLOR;

            cGreenMinTxt                 = new TextBox(GraphicsDevice, null, 190, 100, 20, 90);
            cGreenMinTxt.Text            = "0";
            cGreenMinTxt.Visible         = true;
            cGreenMinTxt.Font            = Font;
            cGreenMinTxt.BackgroundColor = Color.Black;
            cGreenMinTxt.FontColor       = Color.White;
            cGreenMinTxt.Alignment       = Justify.MiddleCenter;

            cGreenMaxTxt                 = new TextBox(GraphicsDevice, null, 190, 200, 20, 90);
            cGreenMaxTxt.Text            = "255";
            cGreenMaxTxt.Visible         = true;
            cGreenMaxTxt.Font            = Font;
            cGreenMaxTxt.BackgroundColor = Color.Black;
            cGreenMaxTxt.FontColor       = Color.White;
            cGreenMaxTxt.Alignment       = Justify.MiddleCenter;

            cBlueLbl                 = new Button(GraphicsDevice, null, 220, 10, 20, 90);
            cBlueLbl.Text            = "Blue";
            cBlueLbl.Visible         = true;
            cBlueLbl.Font            = Font;
            cBlueLbl.BackgroundColor = Color.Transparent;
            cBlueLbl.FontColor       = LBLTEXTCOLOR;

            cBlueMinTxt                 = new TextBox(GraphicsDevice, null, 220, 100, 20, 90);
            cBlueMinTxt.Text            = "0";
            cBlueMinTxt.Visible         = true;
            cBlueMinTxt.Font            = Font;
            cBlueMinTxt.BackgroundColor = Color.Black;
            cBlueMinTxt.FontColor       = Color.White;
            cBlueMinTxt.Alignment       = Justify.MiddleCenter;

            cBlueMaxTxt                 = new TextBox(GraphicsDevice, null, 220, 200, 20, 90);
            cBlueMaxTxt.Text            = "255";
            cBlueMaxTxt.Visible         = true;
            cBlueMaxTxt.Font            = Font;
            cBlueMaxTxt.BackgroundColor = Color.Black;
            cBlueMaxTxt.FontColor       = Color.White;
            cBlueMaxTxt.Alignment       = Justify.MiddleCenter;

            cLifeLbl                 = new Button(GraphicsDevice, null, 250, 10, 20, 90);
            cLifeLbl.Text            = "Dur mSec";
            cLifeLbl.Visible         = true;
            cLifeLbl.Font            = Font;
            cLifeLbl.BackgroundColor = Color.Transparent;
            cLifeLbl.FontColor       = LBLTEXTCOLOR;

            cLifeMinTxt                 = new TextBox(GraphicsDevice, null, 250, 100, 20, 90);
            cLifeMinTxt.Text            = "1000";
            cLifeMinTxt.Visible         = true;
            cLifeMinTxt.Font            = Font;
            cLifeMinTxt.BackgroundColor = Color.Black;
            cLifeMinTxt.FontColor       = Color.White;
            cLifeMinTxt.Alignment       = Justify.MiddleCenter;

            cLifeMaxTxt                 = new TextBox(GraphicsDevice, null, 250, 200, 20, 90);
            cLifeMaxTxt.Text            = "5000";
            cLifeMaxTxt.Visible         = true;
            cLifeMaxTxt.Font            = Font;
            cLifeMaxTxt.BackgroundColor = Color.Black;
            cLifeMaxTxt.FontColor       = Color.White;
            cLifeMaxTxt.Alignment       = Justify.MiddleCenter;

            cDelayLbl                 = new Button(GraphicsDevice, null, 280, 10, 20, 90);
            cDelayLbl.Text            = "Delay mS";
            cDelayLbl.Visible         = true;
            cDelayLbl.Font            = Font;
            cDelayLbl.BackgroundColor = Color.Transparent;
            cDelayLbl.FontColor       = LBLTEXTCOLOR;

            cDelayMinTxt                 = new TextBox(GraphicsDevice, null, 280, 100, 20, 90);
            cDelayMinTxt.Text            = "0";
            cDelayMinTxt.Visible         = true;
            cDelayMinTxt.Font            = Font;
            cDelayMinTxt.BackgroundColor = Color.Black;
            cDelayMinTxt.FontColor       = Color.White;
            cDelayMinTxt.Alignment       = Justify.MiddleCenter;

            cDelayMaxTxt                 = new TextBox(GraphicsDevice, null, 280, 200, 20, 90);
            cDelayMaxTxt.Text            = "50";
            cDelayMaxTxt.Visible         = true;
            cDelayMaxTxt.Font            = Font;
            cDelayMaxTxt.BackgroundColor = Color.Black;
            cDelayMaxTxt.FontColor       = Color.White;
            cDelayMaxTxt.Alignment       = Justify.MiddleCenter;

            cXDistLbl                 = new Button(GraphicsDevice, null, 310, 10, 20, 90);
            cXDistLbl.Text            = "X Dist";
            cXDistLbl.Visible         = true;
            cXDistLbl.Font            = Font;
            cXDistLbl.BackgroundColor = Color.Transparent;
            cXDistLbl.FontColor       = LBLTEXTCOLOR;

            cXDistMinTxt                 = new TextBox(GraphicsDevice, null, 310, 100, 20, 90);
            cXDistMinTxt.Text            = "-300";
            cXDistMinTxt.Visible         = true;
            cXDistMinTxt.Font            = Font;
            cXDistMinTxt.BackgroundColor = Color.Black;
            cXDistMinTxt.FontColor       = Color.White;
            cXDistMinTxt.Alignment       = Justify.MiddleCenter;

            cXDistMaxTxt                 = new TextBox(GraphicsDevice, null, 310, 200, 20, 90);
            cXDistMaxTxt.Text            = "300";
            cXDistMaxTxt.Visible         = true;
            cXDistMaxTxt.Font            = Font;
            cXDistMaxTxt.BackgroundColor = Color.Black;
            cXDistMaxTxt.FontColor       = Color.White;
            cXDistMaxTxt.Alignment       = Justify.MiddleCenter;

            cYDistLbl                 = new Button(GraphicsDevice, null, 340, 10, 20, 90);
            cYDistLbl.Text            = "Y Dist";
            cYDistLbl.Visible         = true;
            cYDistLbl.Font            = Font;
            cYDistLbl.BackgroundColor = Color.Transparent;
            cYDistLbl.FontColor       = LBLTEXTCOLOR;

            cYDistMinTxt                 = new TextBox(GraphicsDevice, null, 340, 100, 20, 90);
            cYDistMinTxt.Text            = "-300";
            cYDistMinTxt.Visible         = true;
            cYDistMinTxt.Font            = Font;
            cYDistMinTxt.BackgroundColor = Color.Black;
            cYDistMinTxt.FontColor       = Color.White;
            cYDistMinTxt.Alignment       = Justify.MiddleCenter;

            cYDistMaxTxt                 = new TextBox(GraphicsDevice, null, 340, 200, 20, 90);
            cYDistMaxTxt.Text            = "300";
            cYDistMaxTxt.Visible         = true;
            cYDistMaxTxt.Font            = Font;
            cYDistMaxTxt.BackgroundColor = Color.Black;
            cYDistMaxTxt.FontColor       = Color.White;
            cYDistMaxTxt.Alignment       = Justify.MiddleCenter;

            cRotateLbl                 = new Button(GraphicsDevice, null, 370, 10, 20, 90);
            cRotateLbl.Text            = "Rotations";
            cRotateLbl.Visible         = true;
            cRotateLbl.Font            = Font;
            cRotateLbl.BackgroundColor = Color.Transparent;
            cRotateLbl.FontColor       = LBLTEXTCOLOR;

            cRotateMinTxt                 = new TextBox(GraphicsDevice, null, 370, 100, 20, 90);
            cRotateMinTxt.Text            = "-5";
            cRotateMinTxt.Visible         = true;
            cRotateMinTxt.Font            = Font;
            cRotateMinTxt.BackgroundColor = Color.Black;
            cRotateMinTxt.FontColor       = Color.White;
            cRotateMinTxt.Alignment       = Justify.MiddleCenter;

            cRotateMaxTxt                 = new TextBox(GraphicsDevice, null, 370, 200, 20, 90);
            cRotateMaxTxt.Text            = "5";
            cRotateMaxTxt.Visible         = true;
            cRotateMaxTxt.Font            = Font;
            cRotateMaxTxt.BackgroundColor = Color.Black;
            cRotateMaxTxt.FontColor       = Color.White;
            cRotateMaxTxt.Alignment       = Justify.MiddleCenter;

            cRotateAfterBtn                 = new Button(GraphicsDevice, null, 400, 10, 20, 280);
            cRotateAfterBtn.Text            = "Spiral Path";
            cRotateAfterBtn.Visible         = true;
            cRotateAfterBtn.Font            = Font;
            cRotateAfterBtn.BackgroundColor = Color.Red;
            cRotateAfterBtn.FontColor       = Color.Black;
            cRotateAfterBtn.Click          += RotateAfterClickHandler;

            cAlphaFadeBtn                 = new Button(GraphicsDevice, null, 430, 10, 20, 280);
            cAlphaFadeBtn.Text            = "Alpha Fade";
            cAlphaFadeBtn.Visible         = true;
            cAlphaFadeBtn.Font            = Font;
            cAlphaFadeBtn.BackgroundColor = Color.Red;
            cAlphaFadeBtn.FontColor       = Color.Black;
            cAlphaFadeBtn.Click          += AlphaFadeClickHandler;

            foreach (TextureFiles CurrTexture in Enum.GetValues(typeof(TextureFiles)))
            {
                strFileName = INTERFACECONTENTDIR + "\\" + EnumTools.GetEnumDescriptionAttribute(CurrTexture);

                NewTexture = Texture2D.FromStream(cGraphDevMgr.GraphicsDevice, new FileStream(strFileName, FileMode.Open));
                cTextureDict.Add(CurrTexture, NewTexture);
            }

            cSparkles = new ParticleEngine2D(cGraphDevMgr.GraphicsDevice);

            return;
        }