#include #include #include #include #include "project/utils/utils.h" void drawBorder(WINDOW*box) { int rows=getmaxy(box)+1; int cols=getmaxx(box)+2; int x=getbegx(box); int y=getbegy(box); //mvwprintw(box,3,1,"%d %d %d %d",x,y,rows,cols); move(y-1,x-1); for (int yy=0;yyFRAMETIME) { if (resizeOccured) { resizeOccured=false; clear(); delwin(messageBox); messageBox=newwin(4,cols-2,rows-5,1); } //mvprintw(5,7,"There are %dx%d squares. (%d)",cols,rows,frameCount++); if (messageBox!=NULL) { drawBorder(messageBox); mvwprintw(messageBox,0,0,"There are %dx%d squares. (%d) It is good!",cols,rows,frameCount); } for (int i=0;i<25;i++) { if (keyLog[i]>0) { mvprintw(6+i,2,"Key %d was pressed.",keyLog[i]); } } refresh(); wrefresh(messageBox); lastTime=clock(); frameCount++; } } free(keyLog); endwin(); return 0; }