/// <summary> /// This function writes text with the color specified int the color param. /// If the text excedes the bounds it will be clipped. /// </summary> /// <param name="x">pos on the x</param> /// <param name="y">pos on the y</param> /// <param name="s">the string</param> /// <param name="color">the color</param> public void drawString(int x, int y, string s, Pixel color) { for (int i = 0; i < s.Length; i++) { draw(x + i, y, Pixel.create(s[i], color.foreground, color.background)); } }
public override bool update(float dTime) { drawLine(2, 3, 12, 20, Pixel.create('0', ConsoleColor.DarkMagenta)); if (isKeyPressed('A')) { drawString(2, 2, "Test here", Pixel.create(' ', ConsoleColor.DarkCyan)); } return(true); }