From cee3b737d0cf0d5426de2e3cc4a57848d1dd8a09 Mon Sep 17 00:00:00 2001 From: gitProtogen Date: Wed, 28 Jan 2026 14:28:00 +0100 Subject: [PATCH] scrolling both directions now works --- ledy.ino | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ledy.ino b/ledy.ino index 3fab0cc..1371bd7 100644 --- a/ledy.ino +++ b/ledy.ino @@ -79,13 +79,13 @@ void scrollAllScrollableTexts() { if (text_nodes[i].pos_y < 7) { - shiftGivenRectangleLeft(text_nodes[i].pos_x, text_nodes[i].pos_y, text_nodes[i].characterSize.width * text_nodes[i].character_count + text_nodes[i].character_count - 1, text_nodes[i].characterSize.height, text_nodes[i].scroll_slowness); + shiftGivenRectangleLeft(text_nodes[i].pos_x, text_nodes[i].pos_y, text_nodes[i].pos_x + text_nodes[i].characterSize.width * text_nodes[i].character_count + text_nodes[i].character_count - 1, text_nodes[i].pos_y + text_nodes[i].characterSize.height - 1, text_nodes[i].scroll_slowness); text_nodes[i].pos_x -= text_nodes[i].scroll_slowness; } else { - shiftGivenRectangleRight(text_nodes[i].pos_x, text_nodes[i].pos_y, text_nodes[i].characterSize.width * text_nodes[i].character_count + text_nodes[i].character_count - 1 , text_nodes[i].pos_y + text_nodes[i].characterSize.height, text_nodes[i].scroll_slowness); - text_nodes[i].pos_x += text_nodes[i].scroll_slowness; + shiftGivenRectangleRight(text_nodes[i].pos_x, text_nodes[i].pos_y, text_nodes[i].pos_x + text_nodes[i].characterSize.width * text_nodes[i].character_count + text_nodes[i].character_count - 1, text_nodes[i].pos_y + text_nodes[i].characterSize.height - 1, text_nodes[i].scroll_slowness); + text_nodes[i].pos_x += text_6nodes[i].scroll_slowness; } } } @@ -98,8 +98,8 @@ void setup() pixels.begin(); pixels.clear(); - addNewTextNode("NET", 0xFF150000); - addNewTextNode("FAILED", 0xFF150000, 0, 9); + addNewTextNode("NET", 0xFF050505); + addNewTextNode("AWAIT", 0xFF050505, 0, 9); drawTextNodes(); pixels.show();