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);