wtf just broke
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
#ifndef FUNCTIONS_H
|
||||
#define FUNCTIONS_H
|
||||
|
||||
#include "ledy.ino"
|
||||
#include "lowLevel.ino"
|
||||
#include "server.ino"
|
||||
|
||||
#endif // FUNCTIONS_H
|
||||
@@ -30,7 +30,7 @@ short getTextNodeX2(TextNode *node)
|
||||
|
||||
void addNewTextNode
|
||||
(
|
||||
char text[TEXT_MAX_LENGTH + 1], uint32_t color = 0x00010101, short pos_x = 0, short pos_y = 0,
|
||||
char text[TEXT_MAX_LENGTH + 1], uint32_t color = 0x00010101, bool handle_pos_via_cursor = true, short pos_x = 0, short pos_y = 0,
|
||||
unsigned char scroll_slowness = 0, bool is_scrolling = true, bool is_small = true
|
||||
)
|
||||
{
|
||||
@@ -43,8 +43,16 @@ void addNewTextNode
|
||||
strncpy(text_nodes[i].content, text, TEXT_MAX_LENGTH);
|
||||
text_nodes[i].color = color;
|
||||
|
||||
text_nodes[i].pos_x = pos_x;
|
||||
text_nodes[i].pos_y = pos_y;
|
||||
if (handle_pos_via_cursor)
|
||||
{
|
||||
text_nodes[i].pos_x = cursor.x;
|
||||
text_nodes[i].pos_y = cursor.y;
|
||||
}
|
||||
else
|
||||
{
|
||||
text_nodes[i].pos_x = pos_x;
|
||||
text_nodes[i].pos_y = pos_y;
|
||||
}
|
||||
|
||||
text_nodes[i].characterSize.height = is_small ? SMALL_TEXT_HEIGHT : MEDIUM_TEXT_HEIGHT;
|
||||
text_nodes[i].characterSize.width = is_small ? SMALL_TEXT_WIDTH : MEDIUM_TEXT_WIDTH;
|
||||
@@ -53,6 +61,11 @@ void addNewTextNode
|
||||
text_nodes[i].is_scrolling = is_scrolling;
|
||||
text_nodes[i].is_deleted = false;
|
||||
ever_created_text_nodes++;
|
||||
|
||||
if (handle_pos_via_cursor)
|
||||
{
|
||||
cursor.x += (text_nodes[i].characterSize.width + 1) * text_length;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -133,7 +146,16 @@ void loop()
|
||||
handle_server();
|
||||
if (text_nodes[0].is_deleted)
|
||||
{
|
||||
addNewTextNode(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~", 0xFF121212, 49, 0, 1);
|
||||
cursor.x = PANEL_MAX_X + 1;
|
||||
addNewTextNode("color", 0xFF121212, true);
|
||||
}
|
||||
else if (text_nodes[1].is_deleted)
|
||||
{
|
||||
addNewTextNode("ful ", 0xFF000036, true);
|
||||
}
|
||||
else if (text_nodes[2].is_deleted)
|
||||
{
|
||||
{addNewTextNode("test", 0xFF121212, true);
|
||||
}
|
||||
scrollAllScrollableTexts();
|
||||
pixels.show();
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "lowLevel.h"
|
||||
|
||||
unsigned char saved_images_count = 0;
|
||||
Cursor cursor1;
|
||||
|
||||
uint32_t saved_imaged[2][16][16] =
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user