/// <summary> /// Draws a text in screen space. Unlike other log entries, texts retain a constant rotation and size. /// Only the point of their origin is transformed regularly. /// </summary> /// <param name="screenX"></param> /// <param name="screenY"></param> /// <param name="text"></param> /// <returns></returns> public VisualLogTextEntry DrawText(float screenX, float screenY, string text) { VisualLogTextEntry entry = new VisualLogTextEntry(); entry.Pos = new Vector3(screenX, screenY, 0.0f); entry.Text = text; this.Draw(entry); return(entry); }
/// <summary> /// Draws a text in world space. Unlike other log entries, texts retain a constant rotation and size. /// Only the point of their origin is transformed regularly. /// </summary> /// <param name="worldX"></param> /// <param name="worldY"></param> /// <param name="worldZ"></param> /// <param name="text"></param> /// <returns></returns> public VisualLogTextEntry DrawText(float worldX, float worldY, float worldZ, string text) { VisualLogTextEntry entry = new VisualLogTextEntry(); entry.Pos = new Vector3(worldX, worldY, worldZ); entry.Anchor = VisualLogAnchor.World; entry.Text = text; this.Draw(entry); return(entry); }
/// <summary> /// Aligns the text of this log entry as specified. /// </summary> /// <param name="entry"></param> /// <param name="blockAlign"></param> /// <returns></returns> public static VisualLogTextEntry Align(this VisualLogTextEntry entry, Alignment blockAlign) { entry.BlockAlignment = blockAlign; return(entry); }