private void DrawText(string text, Font font, Vector2 offset, Color color) { Point p = GraphicsDevice.Viewport.Bounds.Center; Vector2 measure = titleFont.MeasureString(text); float x = p.X - measure.X / 2; float y = p.Y - measure.Y / 2; Vector2 position = new Vector2(x, y); font.Write(text, position + offset, spriteBatch, color); }
public DiagnosticGame() { messages = new Dictionary<string, string>(); font = new Font("Fonts/Diagnostics"); }
public PausableGame() { titleFont = new Font("Fonts/Title"); regularFont = new Font("Fonts/Regular"); }