Fixed word wrap issue (woops)

This commit is contained in:
Dionysus 2024-05-27 16:03:40 -04:00
parent 2915399de6
commit 07474dcd0d
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE

View File

@ -323,19 +323,17 @@ void displayLines() {
String senderNick = line.substring(0, colonIndex); String senderNick = line.substring(0, colonIndex);
String message = line.substring(colonIndex + 1); String message = line.substring(colonIndex + 1);
if (mention) {
tft.setTextColor(TFT_YELLOW, TFT_RED);
} else {
tft.setTextColor(nickColors[senderNick]); tft.setTextColor(nickColors[senderNick]);
}
tft.print(senderNick); tft.print(senderNick);
tft.setTextColor(TFT_WHITE); tft.setTextColor(TFT_WHITE);
tft.print(":" + message); cursorY = renderFormattedMessage(":" + message, cursorY, CHAR_HEIGHT, mention);
cursorY += CHAR_HEIGHT;
} }
} }
displayInputLine();
} }
void addLine(String senderNick, String message, String type, uint16_t errorColor = TFT_WHITE, uint16_t reasonColor = TFT_WHITE) { void addLine(String senderNick, String message, String type, uint16_t errorColor = TFT_WHITE, uint16_t reasonColor = TFT_WHITE) {
if (type != "error" && nickColors.find(senderNick) == nickColors.end()) if (type != "error" && nickColors.find(senderNick) == nickColors.end())
nickColors[senderNick] = generateRandomColor(); nickColors[senderNick] = generateRandomColor();