diff --git a/src/TextRenderer.cpp b/src/TextRenderer.cpp index 2621c01..c6d2749 100644 --- a/src/TextRenderer.cpp +++ b/src/TextRenderer.cpp @@ -96,8 +96,10 @@ void TextRenderer::update(std::string newText) { } if(specialCharacterCurrentX != tempSpecialCharacterCurrentX && specialCharacterCurrentY != tempSpecialCharacterCurrentY) { - clear(tempBlinkX, tempBlinkY, tempBlinkX + 1, tempBlinkY + fontHeight); - translateToSharedMemory(getCharacter(tempSpecialChar, font), tempSpecialCharacterCurrentX, tempSpecialCharacterCurrentY, fontColor); + clear(tempBlinkX, tempBlinkY, tempBlinkX + 1, tempBlinkY + fontHeight + 1); + if(tempSpecialChar != '\n') { + translateToSharedMemory(getCharacter(tempSpecialChar, font), tempSpecialCharacterCurrentX, tempSpecialCharacterCurrentY, fontColor); + } } } else { currentLine = ((i + space) / fontNumbersInOneLine); @@ -127,7 +129,7 @@ void TextRenderer::update(std::string newText) { std::string TextRenderer::adjustText(std::string newText) { int fontNumbersInOneLine = windowWidth / (fontWidth + left_margin); - int totalLine = windowHeight / (fontHeight + bottom_margin) - 1; + int totalLine = windowHeight / (fontHeight + bottom_margin); int stringLine = 1; int characterNumberOfLastLine = 0;