Esempio n. 1
0
    public void PrintLines(string[] text)
    {
        int count = text.Length;

        int linesCount = DisplaySystem.LINES - borderHeight * 2 - 1;

        if (count > linesCount)
        {
            string[] outLines = text.Skip(count - linesCount).ToArray();
            ResetScreen(false);
            Print(string.Join("\n", outLines));
            return;
        }

        if (Cursor.y + count > DisplaySystem.LINES - borderHeight)
        {
            Cursor.MoveUp(count);
            Screen.ScrollUp(borderWidth, borderHeight, count);
        }

        Print(string.Join("\n", text));
    }