public void Draw(SpriteBatch sprite, GameTime gameTime) { SpriteFont Font1 = game.Content.Load <SpriteFont>("Font1"); backgroundRectangle.Draw(gameTime); sprite.DrawString(Font1, name, new Vector2(offset.X + 10, offset.Y + 2), Color.Red); }
public void Draw(SpriteBatch sprite, GameTime gameTime) { SpriteFont Font1 = gameController.Content.Load <SpriteFont>("Font1"); backgroundRectangle.Draw(gameTime); sprite.DrawString(Font1, name, new Vector2(position.X + offset.X + 10, position.Y + offset.Y + 10), Color.Red); sprite.DrawString(Font1, "Duration: " + duration, new Vector2(position.X + offset.X + 10, position.Y + offset.Y + 30), Color.Red); sprite.DrawString(Font1, "Descrition: " + description, new Vector2(position.X + offset.X + 10, position.Y + offset.Y + 60), Color.Red); if (isAnimating) { sprite.DrawString(Font1, "Move In : " + offset.Y, new Vector2(position.X + offset.X + 10, position.Y + offset.Y + 100), Color.Red); } }
public void Draw(SpriteBatch sprite, GameTime gameTime) { backgroundRectangle.Draw(gameTime); int count = 0; for (int i = min; i < max; i++) { items[i].setOffset(new Rectangle((int)offset.X + 1, (int)offset.Y + 5 + (Variables.listItemHeight * count), width - 2, Variables.listItemHeight)); items[i].Draw(sprite, gameTime); count++; } }