diff --git a/src/TextRenderer.cpp b/src/TextRenderer.cpp index c6d2749..2fbccc9 100644 --- a/src/TextRenderer.cpp +++ b/src/TextRenderer.cpp @@ -93,11 +93,14 @@ void TextRenderer::update(std::string newText) { if(_specialCharacter != '\n') { characterBitmap = getCharacter(_specialCharacter, font); translateToSharedMemory(characterBitmap, specialCharacterCurrentX, specialCharacterCurrentY, speicialFontColor); + } else { + blinkX = 0; + blinkY += (fontHeight + bottom_margin); } if(specialCharacterCurrentX != tempSpecialCharacterCurrentX && specialCharacterCurrentY != tempSpecialCharacterCurrentY) { clear(tempBlinkX, tempBlinkY, tempBlinkX + 1, tempBlinkY + fontHeight + 1); - if(tempSpecialChar != '\n') { + if(tempSpecialChar != '\n' && (tempSpecialCharacterCurrentY * 10 + tempSpecialCharacterCurrentX <= specialCharacterCurrentY * 10 + tempSpecialCharacterCurrentX)) { translateToSharedMemory(getCharacter(tempSpecialChar, font), tempSpecialCharacterCurrentX, tempSpecialCharacterCurrentY, fontColor); } }