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