public override void Draw(ZSpriteBatch spriteBatch) { int currY; currY = y; spriteBatch.DrawRectangle(X, Y, width, height, Color.Black); foreach (string msg in messages) { foreach (string line in textReader.Lines(msg)) { currY += font.LineSpacing; if (currY > Y + Height) return; else { spriteBatch.DrawString(font, line, new Vector2(X, currY), color); } } } }
public override void Draw(ZSpriteBatch spriteBatch) { int currY; currY = y; spriteBatch.DrawRectangle(X, Y, width, height, Color.Black); foreach (string msg in messages) { foreach (string line in textReader.Lines(msg)) { currY += font.LineSpacing; if (currY > Y + Height) { return; } else { spriteBatch.DrawString(font, line, new Vector2(X, currY), color); } } } }
public new void DrawString(SpriteFont font, string line, Vector2 position, Color color) { spriteBatch.DrawString(font, line, Offset + position, color); }