public static void SetAttributes(int row, int column, ConsoleColor foreground, ConsoleColor background) { if (Dimensions.Contains(row, column) == true) { char c = buffer[row][column].AsciiChar; buffer[row][column] = new CellInfo(c, foreground, background).CellCharInfo; } }
/// <summary> /// Inserts a character into the drawing buffer and (potetially draws) /// </summary> /// <param name="c">The character to insert</param> /// <param name="row">The row to insert into</param> /// <param name="column">The column to insert into</param> /// <param name="foreground">The foreground color, default white</param> /// <param name="background">The background color, default black</param> public static void InsertCharacter(char c, int row, int column, ConsoleColor foreground = ConsoleColor.White, ConsoleColor background = ConsoleColor.Black) { if (row >= buffer.Length || column >= buffer[0].Length) { return; } else { buffer[row][column] = new CellInfo(c, foreground, background).CellCharInfo; } }