Example #1
0
        public override void Load(Microsoft.Xna.Framework.Content.ContentManager Content)
        {
            gamePad = new GamePadMapper(PlayerIndex.One);

            titleDropInFont           = new DropInFont(Content.Load <SpriteFont>("Fonts\\JingJingTitle"), new Vector2(_viewPort.Width / 2, _viewPort.Height * 0.1f), new Vector2(_viewPort.Width / 2, _viewPort.Height * 0.1f), dropSpeed, "Game Mode", Color.CornflowerBlue);
            titleDropInFont.IsVisible = true;
            titleDropInFont.SetCenterAsOrigin();
            titleDropInFont.EnableShadow   = false;
            titleDropInFont.TintColor      = Color.Black;
            titleDropInFont.ShadowPosition = new Vector2(titleDropInFont.Position.X - 4, titleDropInFont.Position.Y + 4);
            titleDropInFont.ShadowColor    = Color.Gray;

            onePlayerBtn = new Button(Content.Load <Texture2D>("temp 1 player button"), new Vector2(0, 0), Color.White);
            onePlayerBtn.SetCenterAsOrigin();
            onePlayerBtn.Position = new Vector2(_viewPort.Width / 2, titleDropInFont.Position.Y + onePlayerBtn.Origin.Y * 2.5f);

            twoPlayersBtn = new Button(Content.Load <Texture2D>("temp 2 players button"), new Vector2(0, 0), Color.White);
            twoPlayersBtn.SetCenterAsOrigin();
            twoPlayersBtn.Position = new Vector2(_viewPort.Width / 2, onePlayerBtn.Position.Y + twoPlayersBtn.Origin.Y * 4);

            backBtn = new Button(Content.Load <Texture2D>("temp back button"), new Vector2(10, 10), Color.CornflowerBlue);
            backBtn.SetCenterAsOrigin();
            backBtn.Position = backBtn.Origin;

            _sprites.Add(titleDropInFont);
            _sprites.Add(onePlayerBtn);
            _sprites.Add(twoPlayersBtn);
            _sprites.Add(backBtn);
        }
Example #2
0
        public override void Load(Microsoft.Xna.Framework.Content.ContentManager Content)
        {
            gamePad = new GamePadMapper(PlayerIndex.One);

            //GameSprite background = new GameSprite(Content.Load<Texture2D>("Background\\Waiting"), Vector2.Zero, Color.White);
            //background.Scale = Global.Scale;



            inputFont = new FadingFont(Content.Load <SpriteFont>("Fonts\\Outage"), new Vector2(840, 600), 0.1f, 1.0f, 0.01f, 1.0f, "Waiting", Color.White, false);
            inputFont.SetCenterAsOrigin();
            inputFont.EnableShadow = false;


            backBtn          = new Button(Content.Load <Texture2D>("Buttons//Back"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 159, 169), new Rectangle(0, 0, 159, 149));
            backBtn.Origin   = new Vector2(backBtn.Texture.Width / 2, 169);
            backBtn.Position = new Vector2(177, 907 + backBtn.SourceRectangle.Value.Height / 2);


            // _sprites.Add(background);
            _sprites.Add(inputFont);
            _sprites.Add(backBtn);

            if (!Global.UsingKeyboard)
            {
                backBtn.IsPressed = true;
                WebServiceConnection.Client.LeaveGame(WebServiceConnection.GameName);
            }
        }
        public override void Load(Microsoft.Xna.Framework.Content.ContentManager Content)
        {
            gamePad = new GamePadMapper(PlayerIndex.One);

            GameSprite background = new GameSprite(Content.Load <Texture2D>("Background\\Error"), Vector2.Zero, Color.White);

            background.Scale = Global.Scale;


            //errorDropInFont = new DropInFont(Content.Load<SpriteFont>("Fonts\\JingJingTitle"), new Vector2(400, 50), new Vector2(400, 50), dropSpeed, "Error", Color.CornflowerBlue);
            //errorDropInFont.IsVisible = true;
            //errorDropInFont.SetCenterAsOrigin();
            //errorDropInFont.EnableShadow = false;
            //errorDropInFont.TintColor = Color.Black;
            //errorDropInFont.ShadowPosition = new Vector2(errorDropInFont.Position.X - 4, errorDropInFont.Position.Y + 4);
            //errorDropInFont.ShadowColor = Color.Gray;

            //errorInfoFadingFont = new FadingFont(Content.Load<SpriteFont>("Fonts\\SpriteFont1"), new Vector2(_viewPort.Width / 2, _viewPort.Height / 2 - 50), 0.1f, 1.0f, 0.01f, 1.0f, errorInfo, Color.White, false);
            //errorInfoFadingFont.SetCenterAsOrigin();
            //errorInfoFadingFont.EnableShadow = false;

            backButton          = new Button(Content.Load <Texture2D>("Buttons//Back"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 159, 169), new Rectangle(0, 0, 159, 149));
            backButton.Origin   = new Vector2(backButton.Texture.Width / 2, 169);
            backButton.Position = new Vector2(177, 907 + backButton.SourceRectangle.Value.Height / 2);

            //_sprites.Add(errorDropInFont);
            //_sprites.Add(errorInfoFadingFont);
            _sprites.Add(background);
            _sprites.Add(backButton);

            if (!Global.UsingKeyboard)
            {
                backButton.IsPressed = true;
            }
        }
Example #4
0
        public override void Load(Microsoft.Xna.Framework.Content.ContentManager Content)
        {
            gamePad = new GamePadMapper(PlayerIndex.One);

            GameSprite background = new GameSprite(Content.Load <Texture2D>("Background\\MainMenu"), Vector2.Zero, Color.White);

            background.Scale = Global.Scale;


            //titleDropInFont = new DropInFont(Content.Load<SpriteFont>("Fonts\\JingJingTitle"), new Vector2(_viewPort.Width / 2, _viewPort.Height * 0.1f), new Vector2(_viewPort.Width / 2, 50), dropSpeed, "Main Menu", Color.CornflowerBlue);
            //titleDropInFont.IsVisible = true;
            //titleDropInFont.SetCenterAsOrigin();
            //titleDropInFont.EnableShadow = false;
            //titleDropInFont.TintColor = Color.Black;
            //titleDropInFont.ShadowPosition = new Vector2(titleDropInFont.Position.X - 4, titleDropInFont.Position.Y + 4);
            //titleDropInFont.ShadowColor = Color.Gray;

            singlePlayerBtn          = new Button(Content.Load <Texture2D>("Buttons//1Player"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 707, 169), new Rectangle(0, 0, 707, 149));
            singlePlayerBtn.Origin   = new Vector2(singlePlayerBtn.Texture.Width / 2, 169);
            singlePlayerBtn.Position = new Vector2(960, 469 + singlePlayerBtn.SourceRectangle.Value.Height / 2);

            multiPlayerBtn          = new Button(Content.Load <Texture2D>("Buttons//2Players"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 707, 169), new Rectangle(0, 0, 707, 149));
            multiPlayerBtn.Origin   = new Vector2(multiPlayerBtn.Texture.Width / 2, 169);
            multiPlayerBtn.Position = new Vector2(960, 735 + multiPlayerBtn.SourceRectangle.Value.Height / 2);


            optionsBtn          = new Button(Content.Load <Texture2D>("Buttons//Settings"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 159, 169), new Rectangle(0, 0, 159, 149));
            optionsBtn.Origin   = new Vector2(optionsBtn.Texture.Width / 2, 169);
            optionsBtn.Position = new Vector2(1743, 907 + optionsBtn.SourceRectangle.Value.Height / 2);


            inputFont = new FadingFont(Content.Load <SpriteFont>("Fonts\\Outage"), new Vector2(1610, 987), 0.1f, 1.0f, 0.01f, 1.0f, "", Color.White, false);
            inputFont.SetCenterAsOrigin();
            inputFont.EnableShadow = false;

            _sprites.Add(background);

            //_sprites.Add(titleDropInFont);
            _sprites.Add(singlePlayerBtn);
            _sprites.Add(multiPlayerBtn);
            _sprites.Add(optionsBtn);

            _sprites.Add(inputFont);

            if (!Global.UsingKeyboard)
            {
                singlePlayerBtn.IsPressed = true;
            }
        }
        public override void Load(Microsoft.Xna.Framework.Content.ContentManager Content)
        {
            gamePad = new GamePadMapper(PlayerIndex.One);

            GameSprite background = new GameSprite(Content.Load <Texture2D>("Background\\Difficulty"), Vector2.Zero, Color.White);

            background.Scale = Global.Scale;

            //titleDropInFont = new DropInFont(Content.Load<SpriteFont>("Fonts\\JingJingTitle"), new Vector2(_viewPort.Width / 2, _viewPort.Height * 0.1f), new Vector2(_viewPort.Width / 2, _viewPort.Height * 0.1f), dropSpeed, "Multiplayer", Color.CornflowerBlue);
            //titleDropInFont.IsVisible = true;
            //titleDropInFont.SetCenterAsOrigin();
            //titleDropInFont.EnableShadow = false;
            //titleDropInFont.TintColor = Color.Black;
            //titleDropInFont.ShadowPosition = new Vector2(titleDropInFont.Position.X - 4, titleDropInFont.Position.Y + 4);
            //titleDropInFont.ShadowColor = Color.Gray;

            easyBtn          = new Button(Content.Load <Texture2D>("Buttons//Easy"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 520, 169), new Rectangle(0, 0, 520, 149));
            easyBtn.Origin   = new Vector2(easyBtn.Texture.Width / 2, 169);
            easyBtn.Position = new Vector2(960, 469 + easyBtn.SourceRectangle.Value.Height / 2);

            mediumBtn          = new Button(Content.Load <Texture2D>("Buttons//Medium"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 520, 169), new Rectangle(0, 0, 520, 149));
            mediumBtn.Origin   = new Vector2(mediumBtn.Texture.Width / 2, 169);
            mediumBtn.Position = new Vector2(960, 684 + mediumBtn.SourceRectangle.Value.Height / 2);


            hardBtn          = new Button(Content.Load <Texture2D>("Buttons//Hard"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 520, 169), new Rectangle(0, 0, 520, 149));
            hardBtn.Origin   = new Vector2(hardBtn.Texture.Width / 2, 169);
            hardBtn.Position = new Vector2(960, 899 + hardBtn.SourceRectangle.Value.Height / 2);


            backBtn          = new Button(Content.Load <Texture2D>("Buttons//Back"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 159, 169), new Rectangle(0, 0, 159, 149));
            backBtn.Origin   = new Vector2(backBtn.Texture.Width / 2, 169);
            backBtn.Position = new Vector2(177, 907 + backBtn.SourceRectangle.Value.Height / 2);


            //_sprites.Add(titleDropInFont);
            _sprites.Add(background);
            _sprites.Add(easyBtn);
            _sprites.Add(mediumBtn);
            _sprites.Add(hardBtn);
            _sprites.Add(backBtn);

            if (!Global.UsingKeyboard)
            {
                easyBtn.IsPressed = true;
            }
        }
        //string code;

        public override void Load(Microsoft.Xna.Framework.Content.ContentManager Content)
        {
            gamePad = new GamePadMapper(PlayerIndex.One);

            GameSprite background = new GameSprite(Content.Load <Texture2D>("Background\\EnterCode"), Vector2.Zero, Color.White);

            background.Scale = Global.Scale;

            //connectBtn = new TextButton(Content.Load<Texture2D>("Buttons//Blank"), new Vector2(0, 0), Color.White, Content.Load<SpriteFont>("Fonts\\BigOutage"), Color.White, "Join", new Rectangle(0, 117, 404, 137), new Rectangle(0, 0, 404, 117));
            //connectBtn.Origin = new Vector2(connectBtn.Texture.Width / 2, 169);
            //connectBtn.Position = new Vector2(960, 735 + connectBtn.SourceRectangle.Value.Height / 2);


            codeLabel = new FadingFont(Content.Load <SpriteFont>("Fonts\\BigOutage"), new Vector2(_viewPort.Width / 2, _viewPort.Height / 2), 0.1f, 1.0f, 0.01f, 1.0f, Global.onlineCode, Color.LightGoldenrodYellow, false);
            codeLabel.EnableShadow = false;
            codeLabel.SetCenterAsOrigin();

            takenLabel = new FadingFont(Content.Load <SpriteFont>("Fonts\\Outage"), new Vector2(_viewPort.Width / 2, _viewPort.Height / 2 + 100), 0.1f, 1.0f, 0.01f, 1.0f, "That name is taken", Color.Red, false);
            takenLabel.EnableShadow = false;
            takenLabel.SetCenterAsOrigin();
            takenLabel.IsVisible = false;

            doneBtn          = new TextButton(Content.Load <Texture2D>("Buttons//Blank"), new Vector2(0, 0), Color.White, Content.Load <SpriteFont>("Fonts\\BigOutage"), Color.White, "Done", new Rectangle(0, 117, 404, 137), new Rectangle(0, 0, 404, 117));
            doneBtn.Scale    = new Vector2(doneBtn.Scale.X + 0.02f, doneBtn.Scale.Y);
            doneBtn.Origin   = new Vector2(doneBtn.Texture.Width / 2, 137);
            doneBtn.Position = new Vector2(960, 735 + doneBtn.SourceRectangle.Value.Height / 2);


            backBtn          = new Button(Content.Load <Texture2D>("Buttons//Back"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 159, 169), new Rectangle(0, 0, 159, 149));
            backBtn.Origin   = new Vector2(backBtn.Texture.Width / 2, 169);
            backBtn.Position = new Vector2(177, 907 + backBtn.SourceRectangle.Value.Height / 2);

            _sprites.Add(background);
            _sprites.Add(codeLabel);
            _sprites.Add(takenLabel);
            _sprites.Add(backBtn);

            _sprites.Add(doneBtn);



            if (!Global.UsingKeyboard)
            {
                doneBtn.IsPressed = true;
            }
        }
        public override void Load(Microsoft.Xna.Framework.Content.ContentManager Content)
        {
            gamePad = new GamePadMapper(PlayerIndex.One);

            GameSprite background = new GameSprite(Content.Load <Texture2D>("Background\\2Players"), Vector2.Zero, Color.White);

            background.Scale = Global.Scale;

            hostBtn          = new Button(Content.Load <Texture2D>("Buttons//Host"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 707, 169), new Rectangle(0, 0, 707, 149));
            hostBtn.Origin   = new Vector2(hostBtn.Texture.Width / 2, 169);
            hostBtn.Position = new Vector2(960, 469 + hostBtn.SourceRectangle.Value.Height / 2);

            joinBtn          = new Button(Content.Load <Texture2D>("Buttons//Join"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 707, 169), new Rectangle(0, 0, 707, 149));
            joinBtn.Origin   = new Vector2(joinBtn.Texture.Width / 2, 169);
            joinBtn.Position = new Vector2(960, 735 + joinBtn.SourceRectangle.Value.Height / 2);

            //hostBtn = new TextButton(Content.Load<Texture2D>("Buttons//Blank"), new Vector2(0, 0), Color.White, Content.Load<SpriteFont>("Fonts\\BigOutage"), Color.White, "Host", new Rectangle(0, 117, 404, 137), new Rectangle(0, 0, 404, 117));
            //hostBtn.Origin = new Vector2(hostBtn.Texture.Width / 2, 169);
            //hostBtn.Position = new Vector2(960, 469 + hostBtn.SourceRectangle.Value.Height / 2);


            //joinBtn = new TextButton(Content.Load<Texture2D>("Buttons//Blank"), new Vector2(0, 0), Color.White, Content.Load<SpriteFont>("Fonts\\BigOutage"), Color.White, "Join", new Rectangle(0, 117, 404, 137), new Rectangle(0, 0, 404, 117));
            //joinBtn.Origin = new Vector2(joinBtn.Texture.Width / 2, 169);
            //joinBtn.Position = new Vector2(960, 735 + joinBtn.SourceRectangle.Value.Height / 2);


            backBtn          = new Button(Content.Load <Texture2D>("Buttons//Back"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 159, 169), new Rectangle(0, 0, 159, 149));
            backBtn.Origin   = new Vector2(backBtn.Texture.Width / 2, 169);
            backBtn.Position = new Vector2(177, 907 + backBtn.SourceRectangle.Value.Height / 2);


            _sprites.Add(background);
            _sprites.Add(hostBtn);
            _sprites.Add(joinBtn);
            _sprites.Add(backBtn);

            if (!Global.UsingKeyboard)
            {
                hostBtn.IsPressed = true;
            }
        }
        public override void Load(Microsoft.Xna.Framework.Content.ContentManager Content)
        {
            gamePad = new GamePadMapper(PlayerIndex.One);

            GameSprite background = new GameSprite(Content.Load <Texture2D>("Background\\GameMode"), Vector2.Zero, Color.White);

            background.Scale = Global.Scale;

            //titleDropInFont = new DropInFont(Content.Load<SpriteFont>("Fonts\\JingJingTitle"), new Vector2(_viewPort.Width / 2, _viewPort.Height * 0.1f), new Vector2(_viewPort.Width / 2, 50), dropSpeed, "Game Mode", Color.CornflowerBlue);
            //titleDropInFont.IsVisible = true;
            //titleDropInFont.SetCenterAsOrigin();
            //titleDropInFont.EnableShadow = false;
            //titleDropInFont.TintColor = Color.Black;
            //titleDropInFont.ShadowPosition = new Vector2(titleDropInFont.Position.X - 4, titleDropInFont.Position.Y + 4);
            //titleDropInFont.ShadowColor = Color.Gray;

            classicalBtn          = new Button(Content.Load <Texture2D>("Buttons//Classical"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 707, 169), new Rectangle(0, 0, 707, 149));
            classicalBtn.Origin   = new Vector2(classicalBtn.Texture.Width / 2, 169);
            classicalBtn.Position = new Vector2(960, 469 + classicalBtn.SourceRectangle.Value.Height / 2);

            pingPongBtn          = new Button(Content.Load <Texture2D>("Buttons//PingPong"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 707, 169), new Rectangle(0, 0, 707, 149));
            pingPongBtn.Origin   = new Vector2(pingPongBtn.Texture.Width / 2, 169);
            pingPongBtn.Position = new Vector2(960, 735 + pingPongBtn.SourceRectangle.Value.Height / 2);


            backBtn          = new Button(Content.Load <Texture2D>("Buttons//Back"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 159, 169), new Rectangle(0, 0, 159, 149));
            backBtn.Origin   = new Vector2(backBtn.Texture.Width / 2, 169);
            backBtn.Position = new Vector2(177, 907 + backBtn.SourceRectangle.Value.Height / 2);

            //_sprites.Add(titleDropInFont);
            _sprites.Add(background);
            _sprites.Add(classicalBtn);
            _sprites.Add(pingPongBtn);
            _sprites.Add(backBtn);

            if (!Global.UsingKeyboard)
            {
                classicalBtn.IsPressed = true;
            }
        }
Example #9
0
        public override void Load(Microsoft.Xna.Framework.Content.ContentManager Content)
        {
            backgrounds[0] = Content.Load <Texture2D>("Background\\Victory01");
            backgrounds[1] = Content.Load <Texture2D>("Background\\Victory02");
            backgrounds[2] = Content.Load <Texture2D>("Background\\Victory03");
            backgrounds[3] = Content.Load <Texture2D>("Background\\Victory04");
            backgrounds[4] = Content.Load <Texture2D>("Background\\Victory05");

            background       = new GameSprite(Content.Load <Texture2D>("Background\\Victory01"), Vector2.Zero, Color.White);
            background.Scale = Global.Scale;


            gamePad = new GamePadMapper(PlayerIndex.One);

            player1WinsFont = new FadingFont(Content.Load <SpriteFont>("Fonts\\BigOutage"), new Vector2(_viewPort.Width / 2, _viewPort.Height / 2 - 150), 0.1f, 1.0f, 0.01f, 1.0f, string.Format("Player 1 Wins"), Color.White, false);
            player1WinsFont.EnableShadow = false;
            player1WinsFont.SetCenterAsOrigin();
            player1WinsFont.IsVisible = false;

            player2WinsFont = new FadingFont(Content.Load <SpriteFont>("Fonts\\BigOutage"), new Vector2(_viewPort.Width / 2, _viewPort.Height / 2 - 150), 0.1f, 1.0f, 0.01f, 1.0f, string.Format("Player 2 Wins"), Color.White, false);
            player2WinsFont.EnableShadow = false;
            player2WinsFont.SetCenterAsOrigin();
            player2WinsFont.IsVisible = false;


            mainMenuButton          = new Button(Content.Load <Texture2D>("Buttons//Menu"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 707, 169), new Rectangle(0, 0, 707, 149));
            mainMenuButton.Origin   = new Vector2(mainMenuButton.Texture.Width / 2, 169);
            mainMenuButton.Position = new Vector2(960, 800 + mainMenuButton.SourceRectangle.Value.Height / 2);

            _sprites.Add(background);
            _sprites.Add(player1WinsFont);
            _sprites.Add(player2WinsFont);
            _sprites.Add(mainMenuButton);

            if (!Global.UsingKeyboard)
            {
                mainMenuButton.IsPressed = true;
            }
        }
Example #10
0
        public override void Load(Microsoft.Xna.Framework.Content.ContentManager Content)
        {
            gamePad = new GamePadMapper(PlayerIndex.One);

            state = ControlScreenState.SelectingControl;

            GameSprite background = new GameSprite(Content.Load <Texture2D>("Background\\Keys"), Vector2.Zero, Color.White);

            background.Scale = Global.Scale;

            XDocument optionsXml = XDocument.Load(@"XML\Options.xml");

            if (Global.UsingKeyboard)
            {
                XElement player1 = optionsXml.Root.Elements(XName.Get("PlayerControls")).Elements(XName.Get("Keyboard")).Elements(XName.Get("Player")).ToList()[0];
                XElement player2 = optionsXml.Root.Elements(XName.Get("PlayerControls")).Elements(XName.Get("Keyboard")).Elements(XName.Get("Player")).ToList()[1];

                Global.LeftPlayer.UpKey    = (Keys)int.Parse(player1.Element(XName.Get("Up")).Value);
                Global.LeftPlayer.DownKey  = (Keys)int.Parse(player1.Element(XName.Get("Down")).Value);
                Global.RightPlayer.UpKey   = (Keys)int.Parse(player2.Element(XName.Get("Up")).Value);
                Global.RightPlayer.DownKey = (Keys)int.Parse(player2.Element(XName.Get("Down")).Value);
            }
            else
            {
                XElement player1 = optionsXml.Root.Elements(XName.Get("PlayerControls")).Elements(XName.Get("GamePad")).Elements(XName.Get("Player")).ToList()[0];
                XElement player2 = optionsXml.Root.Elements(XName.Get("PlayerControls")).Elements(XName.Get("GamePad")).Elements(XName.Get("Player")).ToList()[1];

                Global.LeftPlayer.UpButton    = (GamePadMapper.GamePadButtons) int.Parse(player1.Element(XName.Get("Up")).Value);
                Global.LeftPlayer.DownButton  = (GamePadMapper.GamePadButtons) int.Parse(player1.Element(XName.Get("Down")).Value);
                Global.RightPlayer.UpButton   = (GamePadMapper.GamePadButtons) int.Parse(player2.Element(XName.Get("Up")).Value);
                Global.RightPlayer.DownButton = (GamePadMapper.GamePadButtons) int.Parse(player2.Element(XName.Get("Down")).Value);
            }

            //titleDropInFont = new DropInFont(Content.Load<SpriteFont>("Fonts//JingJingTitle"), new Vector2(_viewPort.Width / 2, _viewPort.Height * 0.1f), new Vector2(_viewPort.Width / 2, _viewPort.Height * 0.1f), dropSpeed, "Controls", Color.White);
            //titleDropInFont.IsVisible = true;
            //titleDropInFont.SetCenterAsOrigin();
            //titleDropInFont.EnableShadow = false;
            //titleDropInFont.TintColor = Color.Black;
            //titleDropInFont.ShadowPosition = new Vector2(titleDropInFont.Position.X - 4, titleDropInFont.Position.Y + 4);
            //titleDropInFont.ShadowColor = Color.Gray;
            if (Global.UsingKeyboard)
            {
                changeRightUpBtn          = new TextButton(Content.Load <Texture2D>("Buttons//Blank"), new Vector2(0, 0), Color.White, Content.Load <SpriteFont>("Fonts\\BigOutage"), Color.White, Global.RightPlayer.UpKey.ToString(), new Rectangle(0, 117, 404, 137), new Rectangle(0, 0, 404, 117));
                changeRightUpBtn.Origin   = new Vector2(changeRightUpBtn.Texture.Width / 2, 137);
                changeRightUpBtn.Position = new Vector2(1267, 453 + changeRightUpBtn.SourceRectangle.Value.Height / 2);

                changeRightDownBtn          = new TextButton(Content.Load <Texture2D>("Buttons//Blank"), new Vector2(0, 0), Color.White, Content.Load <SpriteFont>("Fonts\\BigOutage"), Color.White, Global.RightPlayer.DownKey.ToString(), new Rectangle(0, 117, 404, 137), new Rectangle(0, 0, 404, 117));
                changeRightDownBtn.Origin   = new Vector2(changeRightDownBtn.Texture.Width / 2, 137);
                changeRightDownBtn.Position = new Vector2(1267, 718 + changeRightDownBtn.SourceRectangle.Value.Height / 2);

                changeLeftUpBtn          = new TextButton(Content.Load <Texture2D>("Buttons//Blank"), new Vector2(0, 0), Color.White, Content.Load <SpriteFont>("Fonts\\BigOutage"), Color.White, Global.LeftPlayer.UpKey.ToString(), new Rectangle(0, 117, 404, 137), new Rectangle(0, 0, 404, 117));
                changeLeftUpBtn.Origin   = new Vector2(changeLeftUpBtn.Texture.Width / 2, 137);
                changeLeftUpBtn.Position = new Vector2(635, 453 + changeLeftUpBtn.SourceRectangle.Value.Height / 2);

                changeLeftDownBtn          = new TextButton(Content.Load <Texture2D>("Buttons//Blank"), new Vector2(0, 0), Color.White, Content.Load <SpriteFont>("Fonts\\BigOutage"), Color.White, Global.LeftPlayer.DownKey.ToString(), new Rectangle(0, 117, 404, 137), new Rectangle(0, 0, 404, 117));
                changeLeftDownBtn.Origin   = new Vector2(changeLeftDownBtn.Texture.Width / 2, 137);
                changeLeftDownBtn.Position = new Vector2(635, 718 + changeLeftDownBtn.SourceRectangle.Value.Height / 2);
            }
            else
            {
                changeRightUpBtn          = new TextButton(Content.Load <Texture2D>("Buttons//Blank"), new Vector2(0, 0), Color.White, Content.Load <SpriteFont>("Fonts\\BigOutage"), Color.White, Global.RightPlayer.UpButton.ToString(), new Rectangle(0, 117, 404, 137), new Rectangle(0, 0, 404, 117));
                changeRightUpBtn.Origin   = new Vector2(changeRightUpBtn.Texture.Width / 2, 137);
                changeRightUpBtn.Position = new Vector2(1267, 453 + changeRightUpBtn.SourceRectangle.Value.Height / 2);

                changeRightDownBtn          = new TextButton(Content.Load <Texture2D>("Buttons//Blank"), new Vector2(0, 0), Color.White, Content.Load <SpriteFont>("Fonts\\BigOutage"), Color.White, Global.RightPlayer.DownButton.ToString(), new Rectangle(0, 117, 404, 137), new Rectangle(0, 0, 404, 117));
                changeRightDownBtn.Origin   = new Vector2(changeRightDownBtn.Texture.Width / 2, 137);
                changeRightDownBtn.Position = new Vector2(1267, 718 + changeRightDownBtn.SourceRectangle.Value.Height / 2);

                changeLeftUpBtn          = new TextButton(Content.Load <Texture2D>("Buttons//Blank"), new Vector2(0, 0), Color.White, Content.Load <SpriteFont>("Fonts\\BigOutage"), Color.White, Global.LeftPlayer.UpButton.ToString(), new Rectangle(0, 117, 404, 137), new Rectangle(0, 0, 404, 117));
                changeLeftUpBtn.Origin   = new Vector2(changeLeftUpBtn.Texture.Width / 2, 137);
                changeLeftUpBtn.Position = new Vector2(635, 453 + changeLeftUpBtn.SourceRectangle.Value.Height / 2);

                changeLeftDownBtn          = new TextButton(Content.Load <Texture2D>("Buttons//Blank"), new Vector2(0, 0), Color.White, Content.Load <SpriteFont>("Fonts\\BigOutage"), Color.White, Global.LeftPlayer.DownButton.ToString(), new Rectangle(0, 117, 404, 137), new Rectangle(0, 0, 404, 117));
                changeLeftDownBtn.Origin   = new Vector2(changeLeftDownBtn.Texture.Width / 2, 137);
                changeLeftDownBtn.Position = new Vector2(635, 718 + changeLeftDownBtn.SourceRectangle.Value.Height / 2);
            }

            /*rightUpDisp = new FadingFont(Content.Load<SpriteFont>("Fonts\\BigOutage"), Vector2.Zero, 0.1f, 1.0f, 0.1f, 1.0f, Global.RightPlayer.UpKey.ToString(), Color.White, true);
             * rightUpDisp.EnableShadow = false;
             * rightUpDisp.Position = new Vector2(changeRightUpBtn.Position.X - rightUpDisp.Size.X / 2, changeRightUpBtn.Bottom - 120);
             */
            /*
             * rightDownDisp = new FadingFont(Content.Load<SpriteFont>("Fonts\\BigOutage"), Vector2.Zero, 0.1f, 1.0f, 0.1f, 1.0f, Global.RightPlayer.DownKey.ToString(), Color.White, true);
             * rightDownDisp.EnableShadow = false;
             * rightDownDisp.Position = new Vector2(changeRightDownBtn.Position.X - rightDownDisp.Size.X / 2, changeRightDownBtn.Bottom - 120);
             *
             * leftUpDisp = new FadingFont(Content.Load<SpriteFont>("Fonts\\BigOutage"), Vector2.Zero, 0.1f, 1.0f, 0.1f, 1.0f, Global.LeftPlayer.UpKey.ToString(), Color.White, true);
             * leftUpDisp.EnableShadow = false;
             * leftUpDisp.Position = new Vector2(changeLeftUpBtn.Position.X - leftUpDisp.Size.X / 2, changeLeftUpBtn.Bottom - 120);
             *
             * leftDownDisp = new FadingFont(Content.Load<SpriteFont>("Fonts\\BigOutage"), Vector2.Zero, 0.1f, 1.0f, 0.1f, 1.0f, Global.LeftPlayer.DownKey.ToString(), Color.White, true);
             * leftDownDisp.EnableShadow = false;
             * leftDownDisp.Position = new Vector2(changeLeftDownBtn.Position.X - leftDownDisp.Size.X / 2, changeLeftDownBtn.Bottom - 120);
             */
            backBtn          = new Button(Content.Load <Texture2D>("Buttons//Back"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 159, 169), new Rectangle(0, 0, 159, 149));
            backBtn.Origin   = new Vector2(backBtn.Texture.Width / 2, 169);
            backBtn.Position = new Vector2(177, 907 + backBtn.SourceRectangle.Value.Height / 2);

            //_sprites.Add(titleDropInFont);

            _sprites.Add(background);
            _sprites.Add(changeRightUpBtn);
            _sprites.Add(changeRightDownBtn);
            _sprites.Add(changeLeftUpBtn);
            _sprites.Add(changeLeftDownBtn);
            //_sprites.Add(rightUpDisp);
            //_sprites.Add(rightDownDisp);
            //_sprites.Add(leftUpDisp);
            //_sprites.Add(leftDownDisp);

            _sprites.Add(backBtn);

            if (!Global.UsingKeyboard)
            {
                changeLeftUpBtn.IsPressed = true;
            }
        }
        public override void Load(Microsoft.Xna.Framework.Content.ContentManager Content)
        {
            gamePad = new GamePadMapper(PlayerIndex.One);

            ScreenState screenState;

            //TODO Change Button so it says "Start"
            //startButton = new Button(Content.Load<Texture2D>("temp play button"), new Vector2(_viewPort.Width / 2, _viewPort.Height / 2), Color.White);
            //startButton.SetCenterAsOrigin();

            infoFont = new FadingFont(Content.Load <SpriteFont>("Fonts\\SpriteFont1"), new Vector2(_viewPort.Width / 2, _viewPort.Height - 15), 0.1f, 1.0f, 0.01f, 1.0f, string.Format("Press any key to continue "), Color.White, false);
            infoFont.EnableShadow = false;
            infoFont.SetCenterAsOrigin();

            greatDropInFont           = new DropInFont(Content.Load <SpriteFont>("Fonts\\JingJingTitle"), new Vector2(_viewPort.Width / 2 - _viewPort.X, -1000), new Vector2(_viewPort.Width / 2 - _viewPort.X, _viewPort.Height * 0.1f), dropSpeed, "GreatMinds", Color.CornflowerBlue);
            greatDropInFont.IsVisible = true;
            greatDropInFont.SetCenterAsOrigin();
            greatDropInFont.EnableShadow   = false;
            greatDropInFont.TintColor      = Color.Black;
            greatDropInFont.ShadowPosition = new Vector2(greatDropInFont.Position.X - 4, greatDropInFont.Position.Y + 4);
            greatDropInFont.ShadowColor    = Color.Gray;
            greatDropInFont.StateChanged  += new EventHandler <StateEventArgs>(epicDropInFont_StateChanged);

            pDropInFont           = new DropInFont(Content.Load <SpriteFont>("Fonts\\JingJingTitle"), new Vector2(greatDropInFont.Origin.X + greatDropInFont.Position.X / 2.5f, -1000), new Vector2(greatDropInFont.Origin.X + greatDropInFont.Position.X / 2.5f, 100), dropSpeed, "P", Color.CornflowerBlue);
            pDropInFont.IsVisible = false;
            pDropInFont.SetCenterAsOrigin();
            pDropInFont.EnableShadow   = false;
            pDropInFont.TintColor      = Color.Black;
            pDropInFont.ShadowPosition = new Vector2(pDropInFont.Position.X - 4, pDropInFont.Position.Y + 4);
            pDropInFont.ShadowColor    = Color.Gray;
            pDropInFont.StateChanged  += new EventHandler <StateEventArgs>(pDropInFont_StateChanged);

            oDropInFont           = new DropInFont(Content.Load <SpriteFont>("Fonts\\JingJingTitle"), new Vector2(pDropInFont.Origin.X * 2.5f + pDropInFont.Position.X, -1000), new Vector2(pDropInFont.Origin.X * 2.5f + pDropInFont.Position.X, 100), dropSpeed, "O", Color.CornflowerBlue);
            oDropInFont.IsVisible = false;
            oDropInFont.SetCenterAsOrigin();
            oDropInFont.EnableShadow   = false;
            oDropInFont.TintColor      = Color.Black;
            oDropInFont.ShadowPosition = new Vector2(oDropInFont.Position.X - 4, oDropInFont.Position.Y + 4);
            oDropInFont.ShadowColor    = Color.Gray;
            oDropInFont.StateChanged  += new EventHandler <StateEventArgs>(oDropInFont_StateChanged);

            nDropInFont           = new DropInFont(Content.Load <SpriteFont>("Fonts\\JingJingTitle"), new Vector2(pDropInFont.Origin.X * 2.5f + oDropInFont.Position.X, -1000), new Vector2(pDropInFont.Origin.X * 2.5f + oDropInFont.Position.X, 100), dropSpeed, "N", Color.CornflowerBlue);
            nDropInFont.IsVisible = false;
            nDropInFont.SetCenterAsOrigin();
            nDropInFont.EnableShadow   = false;
            nDropInFont.TintColor      = Color.Black;
            nDropInFont.ShadowPosition = new Vector2(nDropInFont.Position.X - 4, nDropInFont.Position.Y + 4);
            nDropInFont.ShadowColor    = Color.Gray;
            nDropInFont.StateChanged  += new EventHandler <StateEventArgs>(nDropInFont_StateChanged);

            gDropInFont           = new DropInFont(Content.Load <SpriteFont>("Fonts\\JingJingTitle"), new Vector2(pDropInFont.Origin.X * 2.5f + nDropInFont.Position.X, -1000), new Vector2(pDropInFont.Origin.X * 2.5f + nDropInFont.Position.X, 100), dropSpeed, "G", Color.CornflowerBlue);
            gDropInFont.IsVisible = false;
            gDropInFont.SetCenterAsOrigin();
            gDropInFont.EnableShadow   = false;
            gDropInFont.TintColor      = Color.Black;
            gDropInFont.ShadowPosition = new Vector2(gDropInFont.Position.X - 4, gDropInFont.Position.Y + 4);
            gDropInFont.ShadowColor    = Color.Gray;
            gDropInFont.StateChanged  += new EventHandler <StateEventArgs>(gDropInFont_StateChanged);

            //_sprites.Add(startButton);
            _sprites.Add(infoFont);
            _sprites.Add(greatDropInFont);
            _sprites.Add(pDropInFont);
            _sprites.Add(oDropInFont);
            _sprites.Add(nDropInFont);
            _sprites.Add(gDropInFont);
        }
        public override void Load(Microsoft.Xna.Framework.Content.ContentManager Content)
        {
            _keyboard         = new Dictionary <string, Button>();
            Global.onlineCode = "";
            gamePad           = new GamePadMapper(PlayerIndex.One);

            GameSprite background = new GameSprite(Content.Load <Texture2D>("Background\\EnterCode"), Vector2.Zero, Color.White);

            background.Scale = Global.Scale;
            _sprites.Add(background);

            codeFont = new FadingFont(Content.Load <SpriteFont>("Fonts\\BigOutage"), new Vector2(_viewPort.Width / 2, _viewPort.Height / 2), 0.1f, 1.0f, 0.01f, 1.0f, string.Format(""), Color.White, false);
            codeFont.EnableShadow = false;
            codeFont.Position     = new Vector2(col1 + colDiff * 5, row1 - 100);
            codeFont.SetCenterAsOrigin();


            buttons[0, 0]  = loadkey(Content, "1", col1, row1, scale);
            buttons[0, 1]  = loadkey(Content, "2", col1 + colDiff, row1, scale);
            buttons[0, 2]  = loadkey(Content, "3", col1 + colDiff * 2, row1, scale);
            buttons[0, 3]  = loadkey(Content, "4", col1 + colDiff * 3, row1, scale);
            buttons[0, 4]  = loadkey(Content, "5", col1 + colDiff * 4, row1, scale);
            buttons[0, 5]  = loadkey(Content, "6", col1 + colDiff * 5, row1, scale);
            buttons[0, 6]  = loadkey(Content, "7", col1 + colDiff * 6, row1, scale);
            buttons[0, 7]  = loadkey(Content, "8", col1 + colDiff * 7, row1, scale);
            buttons[0, 8]  = loadkey(Content, "9", col1 + colDiff * 8, row1, scale);
            buttons[0, 9]  = loadkey(Content, "0", col1 + colDiff * 9, row1, scale);
            buttons[0, 10] = loadkey(Content, "#", col1 + colDiff * 10, row1, scale);

            buttons[1, 0]  = loadkey(Content, "Q", col1, row1 + rowDiff, scale);
            buttons[1, 1]  = loadkey(Content, "W", col1 + colDiff, row1 + rowDiff, scale);
            buttons[1, 2]  = loadkey(Content, "E", col1 + colDiff * 2, row1 + rowDiff, scale);
            buttons[1, 3]  = loadkey(Content, "R", col1 + colDiff * 3, row1 + rowDiff, scale);
            buttons[1, 4]  = loadkey(Content, "T", col1 + colDiff * 4, row1 + rowDiff, scale);
            buttons[1, 5]  = loadkey(Content, "Y", col1 + colDiff * 5, row1 + rowDiff, scale);
            buttons[1, 6]  = loadkey(Content, "U", col1 + colDiff * 6, row1 + rowDiff, scale);
            buttons[1, 7]  = loadkey(Content, "I", col1 + colDiff * 7, row1 + rowDiff, scale);
            buttons[1, 8]  = loadkey(Content, "O", col1 + colDiff * 8, row1 + rowDiff, scale);
            buttons[1, 9]  = loadkey(Content, "P", col1 + colDiff * 9, row1 + rowDiff, scale);
            buttons[1, 10] = loadkey(Content, "*", col1 + colDiff * 10, row1 + rowDiff, scale);


            buttons[2, 0]  = loadkey(Content, "A", col1, row1 + rowDiff * 2, scale);
            buttons[2, 1]  = loadkey(Content, "S", col1 + colDiff, row1 + rowDiff * 2, scale);
            buttons[2, 2]  = loadkey(Content, "D", col1 + colDiff * 2, row1 + rowDiff * 2, scale);
            buttons[2, 3]  = loadkey(Content, "F", col1 + colDiff * 3, row1 + rowDiff * 2, scale);
            buttons[2, 4]  = loadkey(Content, "G", col1 + colDiff * 4, row1 + rowDiff * 2, scale);
            buttons[2, 5]  = loadkey(Content, "H", col1 + colDiff * 5, row1 + rowDiff * 2, scale);
            buttons[2, 6]  = loadkey(Content, "J", col1 + colDiff * 6, row1 + rowDiff * 2, scale);
            buttons[2, 7]  = loadkey(Content, "K", col1 + colDiff * 7, row1 + rowDiff * 2, scale);
            buttons[2, 8]  = loadkey(Content, "L", col1 + colDiff * 8, row1 + rowDiff * 2, scale);
            buttons[2, 9]  = loadkey(Content, ".", col1 + colDiff * 9, row1 + rowDiff * 2, scale);
            buttons[2, 10] = loadkey(Content, "&", col1 + colDiff * 10, row1 + rowDiff * 2, scale);

            buttons[3, 0]  = loadkey(Content, "Z", col1, row1 + rowDiff * 3, scale);
            buttons[3, 1]  = loadkey(Content, "X", col1 + colDiff, row1 + rowDiff * 3, scale);
            buttons[3, 2]  = loadkey(Content, "C", col1 + colDiff * 2, row1 + rowDiff * 3, scale);
            buttons[3, 3]  = loadkey(Content, "V", col1 + colDiff * 3, row1 + rowDiff * 3, scale);
            buttons[3, 4]  = loadkey(Content, "B", col1 + colDiff * 4, row1 + rowDiff * 3, scale);
            buttons[3, 5]  = loadkey(Content, "N", col1 + colDiff * 5, row1 + rowDiff * 3, scale);
            buttons[3, 6]  = loadkey(Content, "M", col1 + colDiff * 6, row1 + rowDiff * 3, scale);
            buttons[3, 7]  = loadkey(Content, "-", col1 + colDiff * 7, row1 + rowDiff * 3, scale);
            buttons[3, 8]  = loadkey(Content, "_", col1 + colDiff * 8, row1 + rowDiff * 3, scale);
            buttons[3, 9]  = loadkey(Content, "!", col1 + colDiff * 9, row1 + rowDiff * 3, scale);
            buttons[3, 10] = loadkey(Content, "?", col1 + colDiff * 10, row1 + rowDiff * 3, scale);


            back          = new TextButton(Content.Load <Texture2D>("Buttons//Blank"), new Vector2(0, 0), Color.White, Content.Load <SpriteFont>("Fonts\\BigOutage"), Color.White, "Back", new Rectangle(0, 117, 404, 137), new Rectangle(0, 0, 404, 117));
            back.Scale   *= scale;
            back.Scale    = new Vector2(back.Scale.X + 0.02f, back.Scale.Y);
            back.Origin   = new Vector2(back.Texture.Width / 2, 137);
            back.Position = new Vector2(col1 + 120, row1 + rowDiff * 4 + back.SourceRectangle.Value.Height / 2);

            space          = new TextButton(Content.Load <Texture2D>("Buttons//Blank"), new Vector2(0, 0), Color.White, Content.Load <SpriteFont>("Fonts\\BigOutage"), Color.White, " ", new Rectangle(0, 117, 404, 137), new Rectangle(0, 0, 404, 117));
            space.Scale   *= scale;
            space.Scale    = new Vector2(space.Scale.X + 0.61f, space.Scale.Y);
            space.Origin   = new Vector2(space.Texture.Width / 2, 137);
            space.Position = new Vector2(col1 + colDiff * 3 + 240, row1 + rowDiff * 4 + space.SourceRectangle.Value.Height / 2);

            done          = new TextButton(Content.Load <Texture2D>("Buttons//Blank"), new Vector2(0, 0), Color.White, Content.Load <SpriteFont>("Fonts\\BigOutage"), Color.White, "Done", new Rectangle(0, 117, 404, 137), new Rectangle(0, 0, 404, 117));
            done.Scale   *= scale;
            done.Scale    = new Vector2(done.Scale.X + 0.02f, done.Scale.Y);
            done.Origin   = new Vector2(done.Texture.Width / 2, 137);
            done.Position = new Vector2(col1 + colDiff * 8 + 120, row1 + rowDiff * 4 + done.SourceRectangle.Value.Height / 2);



            backBtn          = new Button(Content.Load <Texture2D>("Buttons//Back"), new Vector2(0, 0), Color.White, new Rectangle(0, 149, 159, 169), new Rectangle(0, 0, 159, 149));
            backBtn.Origin   = new Vector2(backBtn.Texture.Width / 2, 169);
            backBtn.Position = new Vector2(177, 907 + backBtn.SourceRectangle.Value.Height / 2);

            _sprites.Add(codeFont);
            _sprites.Add(back);
            _sprites.Add(space);
            _sprites.Add(done);
            _sprites.Add(backBtn);


            if (!Global.UsingKeyboard)
            {
                //done.IsPressed = true;
                //_keyboard["2"].IsPressed = true;
            }
        }