public TextButton(Texture2D releasedImage, Vector2 location, Color tint, SpriteFont font, Color fontColor, string text, params Rectangle[] rectangles) : base(releasedImage, location, tint, rectangles) { fadingFont = new FadingFont(font, location - _origin + new Vector2(rectangles[0].Width / 2, rectangles[0].Height / 2) * Scale, 0.1f, 1.0f, 0.1f, 1.0f, text, fontColor, true); fadingFont.EnableShadow = false; Text = text; }
public TextButton(Texture2D image, Vector2 location, Color tint, SpriteFont font, Color fontColor, string text) : base(image, location, tint) { fadingFont = new FadingFont(font, location - _origin + new Vector2(image.Width / 2, image.Height / 2) * Scale, 0.1f, 1.0f, 0.1f, 1.0f, text, fontColor, true); fadingFont.EnableShadow = false; Text = text; }
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\\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; } }
//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) { 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; } }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); bgSprite = new GameSprite(Content.Load <Texture2D>("bgImage"), Vector2.Zero, Color.White); bgSprite.ScaleToViewport(GraphicsDevice.Viewport); titleText1 = new DropInFont(Content.Load <SpriteFont>("GameFont"), new Vector2(viewport.HalfWidth(), -1000), screenSize / 2, new Vector2(0, 20), "Great Minds", Color.OrangeRed); titleText1.TargetPosition = new Vector2(titleText1.TargetPosition.X, titleText1.TargetPosition.Y - titleText1.Size.Y / 4); titleText1.SetCenterAsOrigin(); titleText1.ShadowPosition = new Vector2(titleText1.Position.X - 4, titleText1.Position.Y + 4); titleText1.ShadowColor = Color.Black; titleText1.StateChanged += new EventHandler <StateEventArgs>(statefulFont_StateChanged); Vector2 titleText2Pos = new Vector2(titleText1.Position.X + titleText1.Size.X / 2, viewport.HalfHeight() + titleText1.Size.Y / 4); titleText2 = new FadingFont(Content.Load <SpriteFont>("GameFont"), titleText2Pos, Color.Orange); titleText2.Text.Append("Robotics"); titleText2.FadeStep /= 5f; titleText2.StateChanged += new EventHandler <StateEventArgs>(titleText2_StateChanged); titleText2.Fade = false; titleText2.Position -= new Vector2(titleText2.Size.X / 2, 0); titleText2.ShadowPosition -= new Vector2(titleText2.Size.X / 2, 0); titleText2.SetCenterAsOrigin(); titleText1.Text.Clear(); titleText1.Text.Append("Great "); Vector2 titleText3Pos = new Vector2(titleText1.Position.X + titleText1.Size.X / 2, -2000); titleText3 = new DropInFont(Content.Load <SpriteFont>("GameFont"), titleText3Pos, screenSize / 2, new Vector2(0, 20), "Minds", Color.OrangeRed); titleText3.TargetPosition = titleText1.TargetPosition; titleText3.SetCenterAsOrigin(); titleText3.ShadowPosition = new Vector2(titleText3.Position.X - 4, titleText3.Position.Y + 4); titleText3.ShadowColor = Color.Black; titleText3.StateChanged += new EventHandler <StateEventArgs>(statefulFont_StateChanged); titleText3.Tag = GameTags.StartTitleFadeIn; Vector2 byPos = new Vector2(titleText1.Position.X - 100, -1000); by = new AccelDropInFont(Content.Load <SpriteFont>("GameFont"), byPos, screenSize / 2, new Vector2(0, 5), "By:", Color.Orange, new Vector2(0, 1.5f)); by.TargetPosition = titleText1.TargetPosition - new Vector2(100, 100); by.SetCenterAsOrigin(); by.ShadowPosition = new Vector2(by.Position.X - 4, by.Position.Y + 4); by.ShadowColor = Color.Black; by.MaxDropSpeed = new Vector2(15, 15); crashEffect = Content.Load <SoundEffect>("Crash"); //Obtained from http://www.freesound.org/people/EdgardEdition/sounds/113095/ coinsEffect = Content.Load <SoundEffect>("insertcoin"); insertCoins = new ArcadeFont(Content.Load <SpriteFont>("ArcadeFont"), new Vector2(300, 400), Color.Red, Color.White, Color.Yellow, Color.Blue); insertCoins.ShadowPosition = new Vector2(insertCoins.Position.X - 1, insertCoins.Position.Y + 1); insertCoins.ColorCyclesPerSecond = 15; //Default is 10; smaller number blinks slower insertCoins.Text.Append("INSERT COINS"); insertCoins.IsVisible = false; slidingText = new StatefulSequence <SlidingFont>(SlidingFont.FontState.Done, typeof(SlidingFont.FontState)); Vector2 targetPos = new Vector2(505, 400); foreach (char letter in "COOL") { slidingText.Add(new SlidingFont(Content.Load <SpriteFont>("SlidingFont"), new Vector2(50, 350), targetPos, 2f, letter.ToString(), Color.Red) { EnableShadow = false, IsVisible = false, TargetTolerance = 0.625f }); targetPos.X += slidingText[slidingText.Count - 1].Size.X; //Magic # - bad idea } targetPos = new Vector2(505, 420); random = new Random(); foreach (char letter in "Effects!") { slidingText.Add(new SlidingFont(Content.Load <SpriteFont>("SlidingFont"), new Vector2(random.Next(0, GraphicsDevice.Viewport.Width), random.Next(0, GraphicsDevice.Viewport.Height)), targetPos, 1f + (float)random.NextDouble(), letter.ToString(), Color.Red) { EnableShadow = false, IsVisible = false }); targetPos.X += slidingText[slidingText.Count - 1].Size.X; //Magic # - bad idea } coolPanel = new TexturePanel(Content.Load <Texture2D>("WavyEffect"), new Vector2(120, 60), Vector2.One * .5f, new Vector2(550, 425), new Color(60, 60, 60, 128)); coolPanel.IsVisible = false; insertFive = new AchievementPanel(0, Content.Load <SpriteFont>("SlidingFont"), Content.Load <SpriteFont>("ArcadeFont"), "Insert 5 coins", GraphicsDevice); insertFive.Condition = AchievementPanel.AreFiveCoinsInsert; donateHundred = new AchievementPanel(0, Content.Load <SpriteFont>("SlidingFont"), Content.Load <SpriteFont>("ArcadeFont"), "Donate $100 to GMR", GraphicsDevice); donateHundred.Condition = AchievementPanel.AreHundredDollarsDonated; noCoinSpam = new AchievementPanel(0, Content.Load <SpriteFont>("SlidingFont"), Content.Load <SpriteFont>("ArcadeFont"), "Don't insert coins for 30 seconds", GraphicsDevice); noCoinSpam.Position = new Vector2(GraphicsDevice.Viewport.Width - noCoinSpam.Width, noCoinSpam.Position.Y); noCoinSpam.Condition = AchievementPanel.IsNoCoinsInsertedAtThirtySeconds; allAchievementsDone = new AchievementPanel(0, Content.Load <SpriteFont>("SlidingFont"), Content.Load <SpriteFont>("ArcadeFont"), "Finish all achievements", GraphicsDevice); allAchievementsDone.Condition = delegate(GameTime gt) { return(standardAchievementsCompleted); }; StatefulSequence <AchievementPanel> allAchievementPanels = new StatefulSequence <AchievementPanel>(AchievementPanel.PanelState.Done, typeof(AchievementPanel.PanelState)); allAchievementPanels.Add(noCoinSpam); allAchievementPanels.Add(donateHundred); allAchievementPanels.Add(insertFive); allAchievementPanels.SequenceReachedMonitoredState += new StatefulSequence <AchievementPanel> .MonitoredStateReached(allAchievementPanels_SequenceReachedMonitoredState); slidingText.SequenceReachedMonitoredState += new StatefulSequence <SlidingFont> .MonitoredStateReached(slidingText_SequenceReachedMonitoredState); colorfulTypingText = new TypingFont(Content.Load <SpriteFont>("ArcadeFont"), new Vector2(200, 0), Color.Black, "Typing text here", TimeSpan.FromMilliseconds(200)); colorfulTypingText.StateChanged += new EventHandler <StateEventArgs>(typingText_StateChanged); colorfulTypingText.CharacterTyped += new EventHandler <TypingFont.CharacterTypedEventArgs>(typingText_CharacterTyped); colorfulTypingText.Tag = "1"; colorfulTypingText.Start(); regularTypingText = new TypingFont(Content.Load <SpriteFont>("ArcadeFont"), new Vector2(400, 0), Color.Black, "... and more typing text here...", TimeSpan.FromMilliseconds(50)); regularTypingText.StateChanged += new EventHandler <StateEventArgs>(typingText_StateChanged); regularTypingText.Tag = "2"; }
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; } }