public Paddle(SMALL_RECT playArea, short row, PaddleSide aSide, Terminal aTerm) { fPaddleHeight = 5; fPlayArea = playArea; fColor = ConsoleTextColor.White; fSide = aSide; fTerm = aTerm; short column; if (PaddleSide.Left == aSide) column = 0; else column = 79; fPosition = new COORD(column, row); }
public static bool SetTextColor(ConsoleTextColor textColor, bool bright) { IntPtr nConsole = GetStdHandle(STD_OUTPUT_HANDLE); int colorMap; if (bright) { colorMap = (int)textColor | (int)ConsoleTextColor.White; } else { colorMap = (int)textColor; } return SetConsoleTextAttribute(nConsole, colorMap); }
public static bool SetTextColor(ConsoleTextColor textColor) { return SetTextColor(textColor, true); }
public static void Out(string message, ConsoleTextColor color) { ConsoleExtensions.SetTextColor(color); Console.WriteLine(message); ConsoleExtensions.SetTextColor(); }
public static void OutFormat(string message, ConsoleTextColor color, params object[] formatArgs) { Out(string.Format(message, formatArgs), color); }
/// <summary> /// Prompts the user for input. /// </summary> /// <param name="message">The message.</param> /// <returns>string</returns> public static string Prompt(string message, ConsoleTextColor textColor) { return(Prompt(message, textColor, false)); }