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 07474dcd0d95adf54ab4d3f6c2175179445c73ac
parent 2915399de6614532211ab96cd379ef4fa04ca2a9
Author: acidvegas <acid.vegas@acid.vegas>
Date: Mon, 27 May 2024 16:03:40 -0400

Fixed word wrap issue (woops)

Diffstat:
Msrc/main.ino | 12+++++-------

1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/main.ino b/src/main.ino
@@ -323,19 +323,17 @@ void displayLines() {
             String senderNick = line.substring(0, colonIndex);
             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.setTextColor(TFT_WHITE);
-            tft.print(":" + message);
-            cursorY += CHAR_HEIGHT;
+            cursorY = renderFormattedMessage(":" + message, cursorY, CHAR_HEIGHT, mention);
         }
     }
+
+    displayInputLine();
 }
 
+
 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())
         nickColors[senderNick] = generateRandomColor();