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