scrolling fully works now, small y have been changed

This commit is contained in:
2026-01-30 09:44:56 +01:00
parent f669c2f292
commit ab5ec58426
2 changed files with 40 additions and 36 deletions
+3 -4
View File
@@ -718,7 +718,6 @@ constexpr bool font7x5[96][7][5] =
{true, false, false, false, true}, {true, false, false, false, true},
{false, true, true, true, true}, {false, true, true, true, true},
{false, false, false, false, true}, {false, false, false, false, true},
// Note: This would typically have a 7th row showing the descender
}, },
// h (ASCII 104) // h (ASCII 104)
{ {
@@ -896,9 +895,9 @@ constexpr bool font7x5[96][7][5] =
{false, false, false, false, false}, {false, false, false, false, false},
{true, false, false, false, true}, {true, false, false, false, true},
{true, false, false, false, true}, {true, false, false, false, true},
{true, false, false, false, true}, {true, true, true, true, true},
{false, true, true, true, true}, {false, false, false, false, true},
{false, false, false, false, true} {true, true, true, true, true}
}, },
// z (ASCII 122) // z (ASCII 122)
{ {
+12 -7
View File
@@ -62,13 +62,17 @@ void scrollAllScrollableTexts(bool split_scroll_mode = false)
{ {
for (unsigned char i = 0; i < MAX_TEXT_NODES_COUNT; i++) for (unsigned char i = 0; i < MAX_TEXT_NODES_COUNT; i++)
{ {
if (text_nodes[i].is_deleted || !text_nodes[i].is_scrolling) {continue;} if (text_nodes[i].is_deleted) {continue;}
if (text_nodes[i].scroll_slowness < text_nodes[i].scroll_progress)
if (text_nodes[i].is_scrolling)
{
if (text_nodes[i].scroll_slowness > text_nodes[i].scroll_progress)
{ {
text_nodes[i].scroll_progress++; text_nodes[i].scroll_progress++;
continue;
} }
text_nodes[i].scroll_progress = 0;< else
{
text_nodes[i].scroll_progress = 0;
short x1 = text_nodes[i].pos_x; short x1 = text_nodes[i].pos_x;
short x2 = getTextNodeX2(&text_nodes[i]); short x2 = getTextNodeX2(&text_nodes[i]);
@@ -90,6 +94,8 @@ void scrollAllScrollableTexts(bool split_scroll_mode = false)
} }
text_nodes[i].pos_x++; text_nodes[i].pos_x++;
} }
}
}
cursor.x = text_nodes[i].pos_x; cursor.x = text_nodes[i].pos_x;
cursor.y = text_nodes[i].pos_y; cursor.y = text_nodes[i].pos_y;
@@ -125,10 +131,9 @@ void loop()
{ {
pixels.clear(); pixels.clear();
handle_server(); handle_server();
if (text_nodes[0].is_deleted && text_nodes[1].is_deleted) if (text_nodes[0].is_deleted)
{ {
addNewTextNode("test", 0xFF121212, 49); addNewTextNode(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~", 0xFF121212, 49, 0, 1);
addNewTextNode("test", 0xFF121212, -30, 9, 10);
} }
scrollAllScrollableTexts(); scrollAllScrollableTexts();
pixels.show(); pixels.show();