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 void Draw(GameTime gameTime, ZSpriteBatch spriteBatch) { foreach (var panel in Panels) { panel.Draw(spriteBatch); } }
public Brush(ZSpriteBatch spriteBatch, Panel panel) : base(spriteBatch.GraphicsDevice) { this.spriteBatch = spriteBatch; X = panel.X; Y = panel.Y; Offset = new Vector2(X, Y); }
public GameState(Game game) { this.spriteBatch = game.SpriteBatch; this.player = game.Player; this.map = game.Map; this.entities = game.Entities; this.Exit = game.Exit; this.font = game.Font; }
protected GameState(Game game, Screen screen) { this.spriteBatch = game.SpriteBatch; this.player = game.Player; this.map = game.Map; this.entities = game.Entities; this.Exit = game.Exit; this.font = game.Font; Screen = screen; }
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 Draw(ZSpriteBatch spriteBatch) { spriteBatch.DrawRectangle(X, Y, Width, Height, Color.Black, this.border, Color.DarkGray); }
public abstract void Draw(ZSpriteBatch spriteBatch);