From 1a336d46e3ca7e06860ba65169416992c57aeca5 Mon Sep 17 00:00:00 2001 From: smayzy Date: Tue, 16 Dec 2025 10:01:03 +0100 Subject: [PATCH] add update system --- src/main.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 2c378bf..c015213 100644 --- a/src/main.c +++ b/src/main.c @@ -1,4 +1,14 @@ #include +#include + +void update(WINDOW *win) +{ + int win_y, win_x; + char message[] = "test"; + getmaxyx(win, win_y, win_x); + mvwprintw(win, win_y/2, win_x/2 - strlen(message)/2, "%s", message); + wrefresh(win); +} int main() { @@ -23,7 +33,13 @@ int main() wrefresh(top_win); wrefresh(bottom_win); - getch(); + int ch = ERR; + while(ch == ERR) + { + update(top_win); + update(bottom_win); + ch = getch(); + }; delwin(top_win); delwin(bottom_win);