Weiter Logic Fehler changed. v2.1

This commit is contained in:
my 2019-12-18 17:59:22 +01:00
parent bd881ef82d
commit 33fd4b0e47
1 changed files with 7 additions and 6 deletions

View File

@ -56,17 +56,18 @@ void TextRenderer::update(std::string newText) {
std::vector<std::vector<bool>> characterBitmap; std::vector<std::vector<bool>> characterBitmap;
// std::cout << fontNumbersInOneLine << "..." << std::endl; // std::cout << fontNumbersInOneLine << "..." << std::endl;
//
// if(newText.size() < oldTextsize) {
// clear(specialCharacterCurrentX, specialCharacterCurrentY, specialCharacterCurrentX + fontWidth + 1, specialCharacterCurrentX + fontHeight + 1);
// }
if(newText.size() < oldTextsize) { clear();
clear(specialCharacterCurrentX, specialCharacterCurrentY, specialCharacterCurrentX + fontWidth + 1, specialCharacterCurrentX + fontHeight + 1);
}
newText = adjustText(newText); newText = adjustText(newText);
std::cout << newText << "\n" << std::endl; std::cout << newText << "\n" << std::endl;
for(i = 0; i < newText.size(); i++) { 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) { if(newText[i] == returnCharacter) {
space += (fontNumbersInOneLine - ((i + space) % fontNumbersInOneLine) - 1); space += (fontNumbersInOneLine - ((i + space) % fontNumbersInOneLine) - 1);
} else { } else {
@ -113,7 +114,7 @@ void TextRenderer::update(std::string newText) {
translateToSharedMemory(characterBitmap, currentX, currentY, fontColor); translateToSharedMemory(characterBitmap, currentX, currentY, fontColor);
} }
} }
} // }
} }
if(newText.size() < oldTextsize) { if(newText.size() < oldTextsize) {