/// <summary> /// Dibuja todos los elementos de la pantalla. /// </summary> /// <param name="gameTime">Valor temporal interno.</param> public void Draw(GameTime gameTime) { Game.SpriteBatch.Begin(); if (MsgError != null) { Game.SpriteBatch.DrawString( ErrorFont, MsgError, new Vector2(ScreenWidth / 2 - ErrorFont.MeasureString(MsgError).X / 2, ScreenHeight * 2 / 5), Color.Red); } Game.SpriteBatch.DrawString( Font, "Contador", new Vector2(ScreenWidth / 2 - Font.MeasureString("Contador").X / 2, ScreenHeight / 4 - Font.MeasureString("Contador").Y / 2), Color.Black ); BtnJoin.draw(Game); BtnCreate.draw(Game); Game.SpriteBatch.End(); }
/// <summary> /// Dibuja todos los elementos de la pantalla. /// </summary> /// <param name="gameTime">Valor temporal interno.</param> public void Draw(GameTime gameTime) { Game.SpriteBatch.Begin(); BtnBack.draw(Game); Game.SpriteBatch.DrawString( Font, Intro, new Vector2(ScreenWidth / 2 - Font.MeasureString(Intro).X / 2, ScreenHeight / 4), Color.Black ); BtnInput.draw(Game); BtnStart.draw(Game); if (ErrorOcurrered) { Game.SpriteBatch.DrawString( ErrorFont, ErrorMsg, new Vector2(ScreenWidth / 2 - ErrorFont.MeasureString(ErrorMsg).X / 2, ScreenHeight * 7 / 10), Color.Red ); } Game.SpriteBatch.End(); }
/// <summary> /// Dibuja todos los elementos de la pantalla. /// </summary> /// <param name="gameTime">Valor temporal interno.</param> public void Draw(GameTime gameTime) { Game.SpriteBatch.Begin(); BtnBack.draw(Game); Game.SpriteBatch.DrawString( DefaultFont, RoomMessage, new Vector2(ScreenWidth / 2 - DefaultFont.MeasureString(RoomMessage).X / 2, ScreenHeight / 10), Color.Black ); TxtInputRoom.draw(Game); Game.SpriteBatch.DrawString( DefaultFont, NameMessage, new Vector2(ScreenWidth / 2 - DefaultFont.MeasureString(NameMessage).X / 2, ScreenHeight / 2 - DefaultFont.MeasureString(NameMessage).Y), Color.Black ); if (NameError) { Game.SpriteBatch.DrawString(ErrorFont, ErrorNameMsg, new Vector2(ScreenWidth / 2 - ErrorFont.MeasureString(ErrorNameMsg).X / 2, ScreenHeight * 15 / 20), Color.Red); } if (RoomError) { Game.SpriteBatch.DrawString(ErrorFont, ErrorRoomMsg, new Vector2(ScreenWidth / 2 - ErrorFont.MeasureString(ErrorRoomMsg).X / 2, ScreenHeight * 7 / 20), Color.Red); } TxtInputName.draw(Game); BtnStart.draw(Game); Game.SpriteBatch.End(); }