Weiter Logic Fehler changed. v2.2

This commit is contained in:
my 2019-12-18 18:09:25 +01:00
parent 092b65d509
commit a769977a8a
1 changed files with 5 additions and 3 deletions

View File

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