Exemple #1
0
		public static void Draw2dTextAt2dLocation(String text, Vector3 location, Color color)
		{
			// set text color and raster position
			TextEntry textEntry = new TextEntry { Color = color, Position = new Vector2(location.X, location.Y), Text = text };
		    Game.AddText(textEntry);
		}
Exemple #2
0
		public void AddText(TextEntry text)
		{
			_texts.Add(text);
		}
Exemple #3
0
		public static void Draw2dTextAt3dLocation(String text, Vector3 location, Color color)
		{
			// XXX NOTE: "it would be nice if" this had a 2d screenspace offset for
			// the origin of the text relative to the screen space projection of
			// the 3d point.

			// set text color and raster position
			var p = Game.Graphics.GraphicsDevice.Viewport.Project(new Microsoft.Xna.Framework.Vector3(location.X, location.Y, location.Z), Game.ProjectionMatrix, Game.ViewMatrix, Game.WorldMatrix);
			TextEntry textEntry = new TextEntry { Color = color, Position = new Vector2(p.X, p.Y), Text = text };
		    Game.AddText(textEntry);
		}
Exemple #4
0
 public void AddText(TextEntry text)
 {
     _texts.Add(text);
 }