Implement CSV loading and saving functionality; refactor user list management; update UUID generation and search functions; enhance signal handling in main application.

This commit is contained in:
2025-05-13 21:17:07 +02:00
parent 863d3e03e4
commit 2752f252ce
12 changed files with 195 additions and 34 deletions
+23 -1
View File
@@ -3,7 +3,7 @@
#include <string.h>
#include <stdlib.h>
#include "main.h"
#include "tui.h"
void uartDialog(char *uart_adress, int terminal_x, int terminal_y)
{
@@ -105,3 +105,25 @@ void uartDialog(char *uart_adress, int terminal_x, int terminal_y)
}
}
}
void mainMenu(list_t *person_list, int terminal_x, int terminal_y)
{
int win_height = 15;
int win_width = 80;
int start_y = (terminal_y - win_height) / 2;
int start_x = (terminal_x - win_width) / 2;
start_color();
init_pair(1, COLOR_BLACK, COLOR_WHITE);
init_pair(2, COLOR_WHITE, COLOR_RED);
WINDOW *uartwin = newwin(win_height, win_width, start_y, start_x);
wbkgd(uartwin, COLOR_PAIR(1));
box(uartwin, 0, 0);
wattron(uartwin, COLOR_PAIR(1));
wattroff(uartwin, COLOR_PAIR(1));
wrefresh(uartwin);
}