Weiter Logic Fehler changed. v2
This commit is contained in:
parent
c58f4a6af8
commit
bd881ef82d
|
@ -58,9 +58,9 @@ void renderText(TextRenderer *textRenderer) {
|
|||
}
|
||||
|
||||
TextRenderer generateTextRender() {
|
||||
std::string command;
|
||||
std::cout << "fontSize: ";
|
||||
std::getline(std::cin, command);
|
||||
// std::string command;
|
||||
// std::cout << "fontSize: ";
|
||||
// std::getline(std::cin, command);
|
||||
|
||||
int windowWidth = vkvm::getWidth();
|
||||
int windowHeight = vkvm::getHeight();
|
||||
|
|
|
@ -58,7 +58,7 @@ void TextRenderer::update(std::string newText) {
|
|||
// std::cout << fontNumbersInOneLine << "..." << std::endl;
|
||||
|
||||
if(newText.size() < oldTextsize) {
|
||||
clear(currentX, currentY, fontWidth, currentY + fontHeight);
|
||||
clear(specialCharacterCurrentX, specialCharacterCurrentY, specialCharacterCurrentX + fontWidth + 1, specialCharacterCurrentX + fontHeight + 1);
|
||||
}
|
||||
|
||||
newText = adjustText(newText);
|
||||
|
@ -89,11 +89,15 @@ void TextRenderer::update(std::string newText) {
|
|||
blinkY = specialCharacterCurrentY;
|
||||
_specialCharacter = newText[i - 1];
|
||||
|
||||
characterBitmap = getCharacter(_specialCharacter, font);
|
||||
translateToSharedMemory(characterBitmap, specialCharacterCurrentX, specialCharacterCurrentY, speicialFontColor);
|
||||
if(_specialCharacter != '\n') {
|
||||
characterBitmap = getCharacter(_specialCharacter, font);
|
||||
translateToSharedMemory(characterBitmap, specialCharacterCurrentX, specialCharacterCurrentY, speicialFontColor);
|
||||
}
|
||||
|
||||
clear(tempBlinkX, tempBlinkY, tempBlinkX + 1, tempBlinkY + fontHeight);
|
||||
translateToSharedMemory(getCharacter(tempSpecialChar), tempSpecialCharacterCurrentX, tempSpecialCharacterCurrentY, fontColor);
|
||||
if(specialCharacterCurrentX != tempSpecialCharacterCurrentX && specialCharacterCurrentY != tempSpecialCharacterCurrentY) {
|
||||
clear(tempBlinkX, tempBlinkY, tempBlinkX + 1, tempBlinkY + fontHeight);
|
||||
translateToSharedMemory(getCharacter(tempSpecialChar, font), tempSpecialCharacterCurrentX, tempSpecialCharacterCurrentY, fontColor);
|
||||
}
|
||||
} else {
|
||||
currentLine = ((i + space) / fontNumbersInOneLine);
|
||||
|
||||
|
|
Loading…
Reference in New Issue