scrolling fully works now, small y have been changed
This commit is contained in:
@@ -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)
|
||||||
{
|
{
|
||||||
@@ -892,13 +891,13 @@ constexpr bool font7x5[96][7][5] =
|
|||||||
},
|
},
|
||||||
// y (ASCII 121)
|
// y (ASCII 121)
|
||||||
{
|
{
|
||||||
{false, false, false, false, false},
|
{false, false, false, false, false},
|
||||||
{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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -62,33 +62,39 @@ 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)
|
|
||||||
{
|
|
||||||
text_nodes[i].scroll_progress++;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
text_nodes[i].scroll_progress = 0;<
|
|
||||||
|
|
||||||
short x1 = text_nodes[i].pos_x;
|
if (text_nodes[i].is_scrolling)
|
||||||
short x2 = getTextNodeX2(&text_nodes[i]);
|
|
||||||
if (split_scroll_mode || text_nodes[i].pos_y < 7)
|
|
||||||
{
|
{
|
||||||
if (x2 < 0)
|
if (text_nodes[i].scroll_slowness > text_nodes[i].scroll_progress)
|
||||||
{
|
{
|
||||||
text_nodes[i].is_deleted = true;
|
text_nodes[i].scroll_progress++;
|
||||||
continue;
|
}
|
||||||
}
|
else
|
||||||
text_nodes[i].pos_x--;
|
{
|
||||||
}
|
text_nodes[i].scroll_progress = 0;
|
||||||
else
|
|
||||||
{
|
short x1 = text_nodes[i].pos_x;
|
||||||
if (x1 > PANEL_MAX_X)
|
short x2 = getTextNodeX2(&text_nodes[i]);
|
||||||
{
|
if (split_scroll_mode || text_nodes[i].pos_y < 7)
|
||||||
text_nodes[i].is_deleted = true;
|
{
|
||||||
continue;
|
if (x2 < 0)
|
||||||
}
|
{
|
||||||
text_nodes[i].pos_x++;
|
text_nodes[i].is_deleted = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
text_nodes[i].pos_x--;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (x1 > PANEL_MAX_X)
|
||||||
|
{
|
||||||
|
text_nodes[i].is_deleted = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
text_nodes[i].pos_x++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cursor.x = text_nodes[i].pos_x;
|
cursor.x = text_nodes[i].pos_x;
|
||||||
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user