Пример #1
0
        /// <summary>
        /// Writes the specified character.
        /// </summary>
        /// <param name="character">The character.</param>
        protected void InternalWrite(char character)
        {
            // TODO: handle character = newline!

            textDevice.WriteChar(cursorX, cursorY, character, foreground, background);
            cursorX++;

            if (cursorX == width)
            {
                cursorY++;

                if (cursorY == height)
                {
                    textDevice.ScrollUp();
                    cursorY--;
                }

                cursorX = 0;
            }
            SetCursor();
        }
Пример #2
0
        /// <summary>
        /// Writes the specified character.
        /// </summary>
        /// <param name="character">The character.</param>
        protected void InternalWrite(char character)
        {
            if (cursorX == width || character == '\n')
            {
                cursorY++;
                cursorX = 0;

                if (cursorY == height)
                {
                    textDevice.ScrollUp();
                    cursorY--;
                }
            }

            if (character != '\n')
            {
                textDevice.WriteChar(cursorX, cursorY, character, foreground, background);
                cursorX++;
            }

            SetCursor();
        }