/// <inheritdoc /> public override void Draw(GameTime gameTime) { base.Draw(gameTime); _spriteBatch.Begin(); var scoresFont = _uiContentStorage.GetScoresFont(); var titleSize = scoresFont.MeasureString(UiResources.LeaderboardMenuTitle); _spriteBatch.DrawString( scoresFont, UiResources.LeaderboardMenuTitle, new Vector2(Game.GraphicsDevice.Viewport.Bounds.Center.X - titleSize.X / 2, LEADERBOARD_MENU_TITLE_POSITION_Y), Color.White); _goToMainMenuButton.Rect = new Rectangle(Game.GraphicsDevice.Viewport.Bounds.Center.X - BUTTON_WIDTH / 2, LEADERBOARD_MENU_TITLE_POSITION_Y + (int)titleSize.Y + 5, BUTTON_WIDTH, BUTTON_HEIGHT); _goToMainMenuButton.Draw(_spriteBatch); DrawScoreTable(_goToMainMenuButton.Rect.Bottom); _spriteBatch.End(); }