]> git.mdlowis.com Git - archive/afm.git/commitdiff
Two windows of half screen width
authorMichael D. Lowis <mike@mdlowis.com>
Thu, 17 Jul 2014 02:37:14 +0000 (22:37 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Thu, 17 Jul 2014 02:37:14 +0000 (22:37 -0400)
source/main.c

index 094a6797294bb6d660bb8a7f598bca254d448e90..9d7eeaedb0b515682cbd8a066a8b4f7323b748e6 100644 (file)
@@ -2,6 +2,8 @@
 #include <stdbool.h>
 
 static bool Running = true;
+//static int Term_X = 0;
+//static int Term_Y = 0;
 static WINDOW* WindowLeft;
 static WINDOW* WindowRight;
 
@@ -33,11 +35,12 @@ int main(int argc, char** argv) {
     noecho();
     refresh();
     /* Create the left and right windows */
-    WindowLeft  = create_window(0,0,20,20);
-    WindowRight = create_window(20,0,20,20);
+    WindowLeft  = create_window(0,0,LINES,COLS/2);
+    WindowRight = create_window(COLS/2,0,LINES,COLS/2);
     while(Running) {
-        wprintw(WindowLeft,  "Left");
-        wprintw(WindowRight, "Right");
+        //getmaxyx(stdscr, Term_Y, Term_X);
+        wprintw(WindowLeft,  "\rLeft");
+        wprintw(WindowRight, "\rRight");
         wrefresh(WindowLeft);
         wrefresh(WindowRight);
         handle_input(getch());