Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <curses.h>
- void ramki()
- {
- int wys=LINES/2;
- int szer=COLS/2;
- int starty, startx;
- starty=0;
- startx=0;
- WINDOW *win1 = newwin(wys, szer, starty, startx);
- starty=0;
- startx=szer;
- WINDOW *win2 = newwin(wys, szer, starty, startx);
- starty=wys;
- startx=0;
- WINDOW *win3 = newwin(wys, szer, starty, startx);
- starty=wys;
- startx=szer;
- WINDOW *win4 = newwin(wys, szer, starty, startx);
- int j;
- int ch;
- ch=getch();
- if(ch==9)
- {
- j=0;
- while(j<8)
- {
- if(j==0)
- {
- box(win1, 0, 0);
- wrefresh(win1);
- }
- if(j==1)
- {
- box(win2, 0, 0);
- wrefresh(win2);
- }
- if(j==2)
- {
- box(win3, 0, 0);
- wrefresh(win3);
- }
- if(j==3)
- {
- box(win4, 0, 0);
- wrefresh(win4);
- }
- if(j==4)
- {
- wborder(win1,' ',' ',' ',' ',' ',' ',' ',' ');
- wrefresh(win1);
- }
- if(j==5)
- {
- wborder(win2,' ',' ',' ',' ',' ',' ',' ',' ');
- wrefresh(win2);
- }
- if(j==6)
- {
- wborder(win3,' ',' ',' ',' ',' ',' ',' ',' ');
- wrefresh(win3);
- }
- if(j==7)
- {
- wborder(win4,' ',' ',' ',' ',' ',' ',' ',' ');
- wrefresh(win4);
- }
- ch=getch();
- if(ch==9)
- j++;
- if(ch==27)
- break;
- if(j==8)
- j=0;
- }
- }
- }
- int main()
- {
- initscr();
- noecho();
- ramki();
- endwin();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement