acid-drop- Unnamed repository; edit this file 'description' to name the repository. |
git clone git://git.acid.vegas/-c.git |
Log | Files | Refs | Archive | README | LICENSE |
commit 343344e42793833fee51a4b89c8124f94460caeb
parent e721ac125c922466c394f73b455149fddfacb504 Author: acidvegas <acid.vegas@acid.vegas> Date: Sun, 26 May 2024 20:21:17 -0400 IRC color parsing improved even more for /hueg support and closer line spacing. PP4L Diffstat:
|
1 file changed, 3 insertions(+), 3 deletions(-) |
diff --git a/src/main.ino b/src/main.ino @@ -160,13 +160,13 @@ int renderFormattedMessage(String message, int cursorY, int lineHeight, bool hig tft.setTextFont(1); } else { if (highlightNick && !nickHighlighted && message.substring(i).startsWith(nick)) { - tft.setTextColor(TFT_YELLOW); + tft.setTextColor(TFT_YELLOW, bgColor); // Set both foreground and background color for (char nc : nick) { tft.print(nc); i++; } i--; // Adjust for the loop increment - tft.setTextColor(TFT_WHITE); + tft.setTextColor(TFT_WHITE, bgColor); // Reset to white foreground with current background nickHighlighted = true; } else { if (tft.getCursorX() + tft.textWidth(String(c)) > SCREEN_WIDTH) { @@ -180,6 +180,7 @@ int renderFormattedMessage(String message, int cursorY, int lineHeight, bool hig tft.setCursor(tft.getCursorX() + spaceWidth, tft.getCursorY()); } else { // Ensure that background color is applied to characters + tft.fillRect(tft.getCursorX(), tft.getCursorY(), tft.textWidth(String(c)), lineHeight, bgColor); tft.setTextColor(fgColor, bgColor); tft.print(c); } @@ -204,7 +205,6 @@ int renderFormattedMessage(String message, int cursorY, int lineHeight, bool hig return cursorY; // Return the new cursor Y position for the next line } - void turnOffScreen() { Serial.println("Screen turned off"); tft.writecommand(TFT_DISPOFF); // Turn off display |