editing normal nodetText
This commit is contained in:
@@ -71,6 +71,7 @@ void addNewTextNode
|
||||
text_nodes[i].is_scrolling = is_scrolling;
|
||||
text_nodes[i].is_repeating = is_repeating;
|
||||
text_nodes[i].disappear_time = disappear_time;
|
||||
text_nodes[i].id = ever_created_text_nodes;
|
||||
ever_created_text_nodes++;
|
||||
|
||||
if (handle_pos_via_cursor)
|
||||
@@ -82,6 +83,21 @@ void addNewTextNode
|
||||
}
|
||||
}
|
||||
|
||||
void modifyTextNodeById(unsigned char id, uint32_t new_color, char new_text[TEXT_MAX_LENGTH + 1], unsigned char new_slowness)
|
||||
{
|
||||
for (unsigned char i = 0; i < MAX_TEXT_NODES_COUNT; i++)
|
||||
{
|
||||
if (text_nodes[i].id == id && text_nodes[i].disappear_time != 0)
|
||||
{
|
||||
text_nodes[i].color = new_color;
|
||||
strncpy(text_nodes[i].content, new_text, TEXT_MAX_LENGTH);
|
||||
text_nodes[i].character_count = strlen(new_text);
|
||||
text_nodes[i].scroll_slowness = new_slowness;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void scrollAllScrollableTexts(bool split_scroll_mode = false)
|
||||
{
|
||||
for (unsigned char i = 0; i < MAX_TEXT_NODES_COUNT; i++)
|
||||
@@ -187,6 +203,7 @@ void addNewMultiColor
|
||||
multi_color_text_node[i].is_scrolling = is_scrolling;
|
||||
multi_color_text_node[i].is_repeating = is_repeating;
|
||||
multi_color_text_node[i].disappear_time = disappear_time;
|
||||
multi_color_text_node[i].id = ever_created_multi_color_text_nodes;
|
||||
ever_created_multi_color_text_nodes++;
|
||||
|
||||
if (handle_pos_via_cursor)
|
||||
|
||||
Reference in New Issue
Block a user