From 66c60c8cd3f2b833e9b07720ff99d89f392cbcd5 Mon Sep 17 00:00:00 2001 From: my Date: Wed, 18 Dec 2019 18:20:18 +0100 Subject: [PATCH] Weiter Logic Fehler changed. v2.3 --- src/TextRenderer.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); } }