a
This commit is contained in:
@@ -46,11 +46,11 @@ void addNewTextNode
|
||||
text_nodes[i].pos_x = pos_x;
|
||||
text_nodes[i].pos_y = pos_y;
|
||||
|
||||
const unsigned short pos_x2 = getTextNodeX2(&(text_nodes)[i]);
|
||||
const unsigned short POS_X2 = getTextNodeX2(&(text_nodes)[i]);
|
||||
|
||||
if (pos_x2 > PANEL_MAX_X)
|
||||
if (POS_X2 > PANEL_MAX_X)
|
||||
{
|
||||
text_nodes[i].pos_x -= pos_x2 - PANEL_MAX_X;
|
||||
text_nodes[i].pos_x -= POS_X2 - PANEL_MAX_X;
|
||||
}
|
||||
|
||||
text_nodes[i].characterSize.height = is_small ? SMALL_TEXT_HEIGHT : MEDIUM_TEXT_HEIGHT;
|
||||
@@ -71,11 +71,16 @@ void drawTextNodes(bool reset_cursor = true)
|
||||
{
|
||||
if (!text_nodes[i].is_deleted)
|
||||
{
|
||||
const unsigned short POS_X2 = getTextNodeX2(&text_nodes[i]);
|
||||
if (POS_X2 > PANEL_MAX_X)
|
||||
{
|
||||
text_nodes[i].pos_x = POS_X2 - PANEL_MAX_X;
|
||||
}
|
||||
|
||||
if (reset_cursor)
|
||||
{
|
||||
cursor.x = text_nodes[i].pos_x;
|
||||
cursor.y = text_nodes[i].pos_y;
|
||||
|
||||
}
|
||||
|
||||
for (unsigned char j = 0; j < text_nodes[i].character_count; j++)
|
||||
@@ -98,10 +103,10 @@ void scrollAllScrollableTexts(bool split_scroll_mode = false)
|
||||
{
|
||||
if (!text_nodes[i].is_deleted && text_nodes[i].is_scrolling)
|
||||
{
|
||||
short x1 = text_nodes[i].pos_x;
|
||||
short y1 = text_nodes[i].pos_y;
|
||||
short x2 = getTextNodeX2(&text_nodes[i]);
|
||||
short y2 = getTextNodeY2(&text_nodes[i]);
|
||||
unsigned short x1 = text_nodes[i].pos_x;
|
||||
unsigned short y1 = text_nodes[i].pos_y;
|
||||
unsigned short x2 = getTextNodeX2(&text_nodes[i]);
|
||||
unsigned short y2 = getTextNodeY2(&text_nodes[i]);
|
||||
if (split_scroll_mode || text_nodes[i].pos_y < 7)
|
||||
{
|
||||
if (x2 == 0)
|
||||
@@ -149,7 +154,7 @@ void loop()
|
||||
handle_server();
|
||||
if (text_nodes[0].is_deleted && text_nodes[1].is_deleted)
|
||||
{
|
||||
addNewTextNode("test", 0xFF121212);
|
||||
addNewTextNode("test", 0xFF121212, 100);
|
||||
drawTextNodes();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -224,7 +224,7 @@ void shiftGivenRectangleRight(short x1, short y1, short x2, short y2, unsigned c
|
||||
if (src_x >= 0 && src_x <= PANEL_MAX_X) {
|
||||
color = getPixelColor(src_x, y);
|
||||
}
|
||||
|
||||
|
||||
if (dest_x >= 0 && dest_x <= PANEL_MAX_X) {
|
||||
setPixel(dest_x, y, color);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user