public override void Draw(SpriteBatch batch) { if (Points.Empty()) return; var v2First = Points.First(); var v2A = v2First; foreach (var v2B in Points.Skip(1)) { batch.DrawLine(v2A, v2B, Colour, Thickness, 0, Texture); v2A = v2B; } batch.DrawText(Font, Label, v2First, Colour.Invert()); }
protected override void OnDraw(GameTime time, SpriteBatch batch, Vector2 v2Offset) { if (_aryLines == null) return; if (_aryLines.Length == 0) return; batch.DrawText(Font, _aryLines, v2Offset + OffsetContent, Colour); }
public override void Draw(SpriteBatch batch) { batch.DrawRect(Position - Size * 0.5f, Position + Size * 0.5f, Colour); batch.DrawText(Font, Label, Position, Colour.Invert(), true); }
public override void Draw2D(SpriteBatch spriteBatch) { // TODO Prerender this mofo Vector2 origin = Util.GlobalFont.MeasureString(Score.ToString()) / 2f; spriteBatch.DrawText(Position, Score.ToString(), Color, Depth, origin, Scale, Rotation, SpriteEffects.None); //spriteBatch.DrawRectangle(new Rectangle((int)Position.X, (int)Position.Y, 2, 2), Microsoft.Xna.Framework.Color.Red); }