// Con_DrawConsole // // Draws the console with the solid background // The typing input line at the bottom should only be drawn if typing is allowed public static void Draw(int lines, bool drawinput) { if (lines <= 0) { return; } // draw the background Drawer.DrawConsoleBackground(lines); // draw the text _VisLines = lines; int rows = (lines - 16) >> 3; // rows of text to draw int y = lines - 16 - (rows << 3); // may start slightly negative for (int i = _Current - rows + 1; i <= _Current; i++, y += 8) { int j = i - BackScroll; if (j < 0) { j = 0; } int offset = (j % _TotalLines) * _LineWidth; for (int x = 0; x < _LineWidth; x++) { Drawer.DrawCharacter((x + 1) << 3, y, _Text[offset + x]); } } // draw the input prompt, user text, and cursor if desired if (drawinput) { DrawInput(); } }