paint: cleanup

This commit is contained in:
luboslenco
2026-03-09 23:02:08 +01:00
parent e554a2376c
commit 66ff3793d4
48 changed files with 2394 additions and 2674 deletions
+2 -2
View File
@@ -105,7 +105,7 @@ void nodes_material_group_output_button(i32 node_id) {
nodes_material_add_socket_button(nodes, node, node->inputs);
}
void nodes_material_add_socket_menu() {
void nodes_material_add_socket_menu_draw() {
ui_nodes_t *nodes = _nodes_material_nodes;
ui_node_t *node = _nodes_material_node;
ui_node_socket_t_array_t *sockets = _nodes_material_sockets;
@@ -136,7 +136,7 @@ void nodes_material_add_socket_button(ui_nodes_t *nodes, ui_node_t *node, ui_nod
gc_unroot(_nodes_material_sockets);
_nodes_material_sockets = sockets;
gc_root(_nodes_material_sockets);
ui_menu_draw(&nodes_material_add_socket_menu, -1, -1);
ui_menu_draw(&nodes_material_add_socket_menu_draw, -1, -1);
}
}
@@ -7,13 +7,7 @@ void text_texture_node_init() {
any_map_set(parser_material_node_values, "TEX_TEXT", text_texture_node_value);
}
void _parser_material_cache_tex_text_node(char *file, char *text) {
if (any_map_get(data_cached_images, file) == NULL) {
sys_notify_on_next_frame(&_parser_material_cache_tex_text_node_205902, text);
}
}
void _parser_material_cache_tex_text_node_205902(char *text) {
void _parser_material_cache_tex_text_node_on_next_frame(char *text) {
char *_text_tool_text = context_raw->text_tool_text;
gpu_texture_t *_text_tool_image = context_raw->text_tool_image;
context_raw->text_tool_text = string_copy(text);
@@ -26,6 +20,12 @@ void _parser_material_cache_tex_text_node_205902(char *text) {
context_raw->text_tool_image = _text_tool_image;
}
void _parser_material_cache_tex_text_node(char *file, char *text) {
if (any_map_get(data_cached_images, file) == NULL) {
sys_notify_on_next_frame(&_parser_material_cache_tex_text_node_on_next_frame, text);
}
}
char *text_texture_node_vector(ui_node_t *node, ui_node_socket_t *socket) {
char *tex_name = parser_material_node_name(node, NULL);
buffer_t *text_buffer = node->buttons->buffer[0]->default_value;