From 33fd4b0e476ed832b17786ea007b82eb4bf36d79 Mon Sep 17 00:00:00 2001 From: my Date: Wed, 18 Dec 2019 17:59:22 +0100 Subject: [PATCH] Weiter Logic Fehler changed. v2.1 --- src/TextRenderer.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/TextRenderer.cpp b/src/TextRenderer.cpp index 6acf67f..902d0f1 100644 --- a/src/TextRenderer.cpp +++ b/src/TextRenderer.cpp @@ -56,17 +56,18 @@ void TextRenderer::update(std::string newText) { std::vector> characterBitmap; // std::cout << fontNumbersInOneLine << "..." << std::endl; +// +// if(newText.size() < oldTextsize) { +// clear(specialCharacterCurrentX, specialCharacterCurrentY, specialCharacterCurrentX + fontWidth + 1, specialCharacterCurrentX + fontHeight + 1); +// } - if(newText.size() < oldTextsize) { - clear(specialCharacterCurrentX, specialCharacterCurrentY, specialCharacterCurrentX + fontWidth + 1, specialCharacterCurrentX + fontHeight + 1); - } - + clear(); newText = adjustText(newText); std::cout << newText << "\n" << std::endl; for(i = 0; i < newText.size(); i++) { - if(i > oldText.size() || oldText[i] != newText[i]) { +// if(i > oldText.size() || oldText[i] != newText[i]) { if(newText[i] == returnCharacter) { space += (fontNumbersInOneLine - ((i + space) % fontNumbersInOneLine) - 1); } else { @@ -113,7 +114,7 @@ void TextRenderer::update(std::string newText) { translateToSharedMemory(characterBitmap, currentX, currentY, fontColor); } } - } +// } } if(newText.size() < oldTextsize) {