From c6614d9239750128fbfc04dbd101607e0bf939bc Mon Sep 17 00:00:00 2001 From: smayzy Date: Tue, 16 Dec 2025 09:25:09 +0100 Subject: [PATCH] add 2 windows --- src/main.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index f1851cf..2c378bf 100644 --- a/src/main.c +++ b/src/main.c @@ -4,10 +4,29 @@ int main() { initscr(); noecho(); + cbreak(); curs_set(0); - printw("Hello World"); + + int y,x; + getmaxyx(stdscr, y, x); + + WINDOW *top_win; + WINDOW *bottom_win; + + top_win = newwin(y/2, x, 0, 0); + bottom_win = newwin(y-y/2, x, y/2, 0); + + box(top_win, 0, 0); + box(bottom_win, 0, 0); + refresh(); + wrefresh(top_win); + wrefresh(bottom_win); + getch(); + + delwin(top_win); + delwin(bottom_win); endwin(); return 0;