public void DrawText(string text, Vector2 position, bool shadow) { if (!this.lastWasText) { this.currentRenderLevel++; this.lastWasText = true; } if (shadow) { var shadowText = new Text { Content = text, Position = new Point((int)position.X + 1, (int)position.Y + 1 - 2), Font = this.regularFont, Color = OpenGLRenderer.TextShadowColor }; this.renderer.DrawText(shadowText, this.currentRenderLevel); } var foregroundText = new Text { Content = text, Position = new Point((int)position.X, (int)position.Y - 2), Font = this.regularFont, Color = Color.White }; this.renderer.DrawText(foregroundText, this.currentRenderLevel); }
public void DrawText(string text, Vector2 position, Color color) { if (!this.lastWasText) { this.currentRenderLevel++; this.lastWasText = true; } var drawnText = new Text { Content = text, Position = new Point((int)position.X - 1, (int)position.Y - 2), Font = this.regularFont, Color = color }; this.renderer.DrawText(drawnText, this.currentRenderLevel); }