protected void GetTypedChars(IAsyncResult r) { typedText = Guide.EndShowKeyboardInput(r); if (typedText == null || typedText == "") { typedText = "Anonymous"; } if (typedText.Length > 10) { typedText = typedText.Substring(0, 10); } highScores.WriteInNewHighScore(new HighScoreEntry(newScoreToPost, maxWaveToPost, typedText)); RootControl = new HighScorePanel(ScreenManager.Game.Content, highScores); }
public override void LoadContent() { ContentManager content = ScreenManager.Game.Content; ((Game1)(ScreenManager.Game)).SetBackgroundSubtitle("Sprites\\Titles\\HighScores", 1.0f); //check for isoStore version of highScores highScores = new HighScoreTable(); madeHighScore = highScores.Load(content, newScoreToPost, maxWaveToPost); if (madeHighScore) { kbResult = Guide.BeginShowKeyboardInput(PlayerIndex.One, "You Placed in the High Scores!", "Enter Your Name (Max 10 Characters)", ((typedText == null) ? "" : typedText), GetTypedChars, null); tapForMainMenuTexture = content.Load<Texture2D>("Sprites\\Titles\\TapHoldShareTapMainMenu"); } else { tapForMainMenuTexture = content.Load<Texture2D>("Sprites\\Titles\\TapForMainMenu"); } tapForMainMenuTextureLocation = new Vector2(ScreenManager.GraphicsDevice.Viewport.Width / 2 - tapForMainMenuTexture.Width / 2, ScreenManager.GraphicsDevice.Viewport.Height - 180); RootControl = new HighScorePanel(content, highScores); base.LoadContent(); }