public override void Draw(ZSpriteBatch spriteBatch) { spriteBatch.DrawRectangle(X, Y, Width, Height, BackgroundColour, this.border, BorderColour); Brush brush = new Brush(spriteBatch, this); DrawContent(brush); }
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 override void DrawRectangle(int x, int y, int width, int height, Color color) { spriteBatch.DrawRectangle(X + x, Y + y, width, height, color); }
public override void Draw(ZSpriteBatch spriteBatch) { spriteBatch.DrawRectangle(X, Y, Width, Height, Color.Black, this.border, Color.DarkGray); }