示例#1
0
void roadsidedraw()
{
	for(scan=0;scan<=30;scan++)
	{
		if(scan%2==0)
		{
			iSetColor(0,60,0);
			iFilledRectangle(0,53*scan-i,1000,100);
		}
		else if(scan%3==0)
		{
			if(counter)
				iSetColor(31,62,0);
			else
				iSetColor(205,255,155);

			iFilledRectangle(0,53*scan-i,1000,50);
		}
		else if(scan%5==0)
		{
			iSetColor(GREEN);
			iFilledRectangle(0,53*scan-i,1000,25);
		}
		else
			{
			iSetColor(0,128,0);
			iFilledRectangle(0,53*scan-i,1000,25);
			}

	}


}
示例#2
0
void iText_Field(char* text)
{
	//TEXT FIELD PORTION START
	
	iSetcolor(0,0,64);
	iFilledRectangle(0,20,640,80);
	iSetcolor(255,255,255);
	iFilledRectangle(320,30,310,60);
	iText(20,40,text,GLUT_BITMAP_TIMES_ROMAN_24);
	iSetcolor(0,0,0);
	
	
	
	if(char_top>=0)
	for(int i=0;i<=char_top;i++)
		iText(stack[i].pos,50,stack[i].num,GLUT_BITMAP_TIMES_ROMAN_24);   //printing the numbers


		if(char_flag==0)
	{
		iLine(char_x+315,80,315+char_x,35);     //blinking portion
		char_flag=1;
		
	}

}
示例#3
0
void roaddraw()
{
	
	iSetColor(120,120,120);
	iFilledRectangle(100,0,400,700);

	iSetColor(120,120,120);
	iFilledRectangle(500,0,400,700);
	
}
void iDraw()
{
	mydelay(100);
	iClear();
	
	//check if hit upper wall
	boxhitball();
	if(turn==0 || ballhitbox==0)
	{
		if(posy+radius>=win_h)
		{
			//change direction of motion
			dy = -dy;
		} //now check for hitting lower wall
		else if(posy-radius<=0)
		{
			dy = -dy;
		}
		else if(posx+radius>=win_w)
		{
			dx = -dx;
		}
		else if(posx-radius<=0)
		{
			dx = -dx;
		}
		
		posx=posx+dx;
		posy=posy+dy;
	}


	
	
	iFilledCircle(posx,posy,radius);
	iFilledRectangle(boxx,boxy,boxw,boxh);




	//place your drawing codes here
}
void initial_Window(void)
{
	//creates the window to show
	if(mode==0){
		iSetColor(0,255,100);
		iFilledRectangle(0,0,window_sizeX,window_sizeY);
		iShowBMP(0,0,"func_plot.bmp");
		iShowBMP(700,400,"cartesian.bmp");
		iShowBMP(700,300,"polar.bmp");
		
		iShowBMP(400,200,"help.bmp");
		iShowBMP(250,200,"credit.bmp");
	}
	
	if(mode==1) cartesian_draw();
	else if(mode==2) polar_draw();

	else if(mode==4) help_view();
	else if(mode==5) show_credits();


}
示例#6
0
void cardamage()
{
	iSetColor(RED);
	char ab='%';
	damagecount=collision/15;
	damagecount_c=collision_c/15;

	if(damagecount<=100 && damagecount_c<=100)
	{

	sprintf(damage,"%d%c",damagecount,ab);

	sprintf(damage_c,"%d%c",damagecount_c,ab);


	iText(260, 500,damage,GLUT_BITMAP_HELVETICA_18);

	iText(260, 400, damage_c,GLUT_BITMAP_HELVETICA_18);

	


	if(color_track==1)
		iSetColor(RED);
	else if(color_track==2)
		iSetColor(BLUE);
	else if(color_track==3)
		iSetColor(YELLOW);
	else if(color_track==4)
		iSetColor(GREEN);
	else if(color_track==5)
		iSetColor(WHITE);
	else
		iSetColor(RED);


	iText(100, 520, "PLAYER 1 CAR DAMAGE",GLUT_BITMAP_HELVETICA_18);


    if(color_track==1)
		iSetColor(BLUE);
	else if(color_track==2)
		iSetColor(YELLOW);
	else if(color_track==3)
		iSetColor(GREEN);
	else if(color_track==4)
		iSetColor(WHITE);
	else if(color_track==5)
		iSetColor(255,128,128);
	else
		iSetColor(BLUE);

	iText(100, 420, "PLAYER 2 CAR DAMAGE",GLUT_BITMAP_HELVETICA_18);

	if((collision/10)<=70)iSetColor(0,100,0);
	else if((collision/10)>=70&&(collision/10)<=120)iSetColor(YELLOW);
	else iSetColor(RED);

	iFilledRectangle(100,500,150-collision/10,10);

	if((collision_c/10)<=70)iSetColor(0,100,0);
	else if((collision_c/10)>=70&&(collision_c/10)<=120)iSetColor(YELLOW);
	else iSetColor(RED);

	iFilledRectangle(100,400,150-collision_c/10,10);
	}

}
示例#7
0
void roadlinedraw_c()
{

	double x1_c=700,y1_c=750;

	if(x2_c>=3.5+addition)
		x2_c=3.5+addition;

	if(x2_c<=0)
		x2_c=0;

	if(mode1_c==1)
	{
		x2_c+=.0095;	
	}
	if(mode2_c==1||mode1_c==0)
	{
		if(mode1_c==0 && mode2_c!=1)
		{
			x2_c-=.0009;
		}
		if(mode2_c==1) x2_c-=.003;
	}

	iSetColor(255,215,0);
	iFilledRectangle(x1_c,y1_c-i,15,100);

	if(i<=210&&i>=200)h=5;
	{
		iFilledRectangle(x1_c,y1_c-h,15,100);
		if(colicheck==0)h+=x2_c;
		else h+=.8;
		
	}
	if(i<=410 && i>=400)z=5;
	{
		iFilledRectangle(x1_c,y1_c-z,15,100);
		if(colicheck==0)z+=x2_c;
		else z+=.8;

	
	}
	if(i<=610&&i>=600)g=5;
	{
		iFilledRectangle(x1_c,y1_c-g,15,100);
		if(colicheck==0)g+=x2_c;
		else g+=.8;
		

	
	}

	if(colicheck==0)i+=x2_c;
	else 
			
	{
		i+=.8;
		x2_c=.8;
	}
	
	if(i>=850)
	{
		i=0;
		reach++;
	}
	if(reach==15)
	{
		iShowBMP(x1_c+100,y1_c+100-i,"imagess//0_norm.bmp");
	}
	if(reach==16)
	{
		iShowBMP(x1_c+100,y1_c+100-i,"imagess//1_norm.bmp"); 
	}
	if(reach==25)
	{
		iShowBMP(x1_c+100,y1_c+100-i,"imagess//2_norm.bmp"); 
	}
	if(reach==26)
	{
		iShowBMP(x1_c+100,y1_c+100-i,"imagess//3_norm.bmp"); 
	}
	
	if(reach>=30)
	{
		milestone();
		declare_win();
		iText(500,350,"GAME OVER");
	
	}

	
}
示例#8
0
void roadlinedraw()
{

	int x1=300,y1=750;

	if(x2>=3.5+addition)x2=3.5+addition;
	if(x2<=0)x2=0;
	if(mode1==1)
	{
		x2+=.0095;
		asif++;
	}

	if(mode2==1||mode1==0)
	{
		if(mode1==0 && mode2!=1)
		{
			x2-=.0009;
		}
		if(mode2==1) x2-=.003;
	}


	iSetColor(255,215,0);

	iFilledRectangle(x1,y1-i,15,100);

	if(i<=210&&i>=200)h=5;
	{
		iFilledRectangle(x1,y1-h,15,100);
		if(colicheck==0)h+=x2;
		else h+=.8;
		
	}
	if(i<=410 && i>=400)z=5;
	{
		iFilledRectangle(x1,y1-z,15,100);
		if(colicheck==0)z+=x2;
		else z+=.8;

	
	}
	if(i<=610&&i>=600)g=5;
	{
		iFilledRectangle(x1,y1-g,15,100);
		if(colicheck==0)g+=x2;
		else g+=.8;
		
	}

	if(colicheck==0)i+=x2;
	else 
			
	{
		i+=.8;
		x2=.8;
	}
	
	if(i>=850)
	{
		i=0;
		reach++;
	}

	if(reach==10)
	{
		iShowBMP(x1-180,y1+100-i,"imagess//4_norm.bmp"); 
	}
	if(reach==11)
	{
		iShowBMP(x1-180,y1+100-i,"imagess//5_norm.bmp"); 
	}
	if(reach==20)
	{
		iShowBMP(x1-180,y1+100-i,"imagess//6_norm.bmp"); 
	}
	if(reach==21)
	{
		iShowBMP(x1-180,y1+100-i,"imagess//2_norm.bmp");
	}

	if(reach>=30)
	{
		milestone();//for adding milestone 
	
	}
	
}
示例#9
0
void track_col()
{
	switch(color_track)
	{
	case 1: 
		iSetColor(RED);
		iFilledRectangle(290,0,10,50);
		iSetColor(WHITE);
		iFilledRectangle(290,50,10,50);

		iSetColor(WHITE);
		iFilledRectangle(450,0,10,50);
	    iSetColor(RED);
		iFilledRectangle(450,50,10,50);
		
		iText(290,170, "TRACK FOR PLAYER 1",GLUT_BITMAP_HELVETICA_18);

		iSetColor(BLUE);
		iFilledRectangle(500,0,10,50);
		iSetColor(WHITE);
		iFilledRectangle(500,50,10,50);

		iSetColor(WHITE);
		iFilledRectangle(660,0,10,50);
		iSetColor(BLUE);
		iFilledRectangle(660,50,10,50);

		iText(500,170, "TRACK FOR PLAYER 2",GLUT_BITMAP_HELVETICA_18);

		break;


	case 2:
		iSetColor(BLUE);
		iFilledRectangle(290,0,10,50);
		iSetColor(WHITE);
		iFilledRectangle(290,50,10,50);

		iSetColor(WHITE);
		iFilledRectangle(450,0,10,50);
	    iSetColor(BLUE);
		iFilledRectangle(450,50,10,50);
		
		iText(290,170, "TRACK FOR PLAYER 1",GLUT_BITMAP_HELVETICA_18);

		iSetColor(YELLOW);
		iFilledRectangle(500,0,10,50);
		iSetColor(WHITE);
		iFilledRectangle(500,50,10,50);

		iSetColor(WHITE);
		iFilledRectangle(660,0,10,50);
		iSetColor(YELLOW);
		iFilledRectangle(660,50,10,50);

		iText(500,170, "TRACK FOR PLAYER 2",GLUT_BITMAP_HELVETICA_18);

		break;

	case 3:
		iSetColor(YELLOW);
		iFilledRectangle(290,0,10,50);
		iSetColor(WHITE);
		iFilledRectangle(290,50,10,50);

		iSetColor(WHITE);
		iFilledRectangle(450,0,10,50);
	    iSetColor(YELLOW);
		iFilledRectangle(450,50,10,50);
		
		iText(290,170, "TRACK FOR PLAYER 1",GLUT_BITMAP_HELVETICA_18);

		iSetColor(GREEN);
		iFilledRectangle(500,0,10,50);
		iSetColor(WHITE);
		iFilledRectangle(500,50,10,50);

		iSetColor(WHITE);
		iFilledRectangle(660,0,10,50);
		iSetColor(GREEN);
		iFilledRectangle(660,50,10,50);

		iText(500,170, "TRACK FOR PLAYER 2",GLUT_BITMAP_HELVETICA_18);

		break;

	case 4:
		iSetColor(GREEN);
		iFilledRectangle(290,0,10,50);
		iSetColor(WHITE);
		iFilledRectangle(290,50,10,50);

		iSetColor(WHITE);
		iFilledRectangle(450,0,10,50);
	    iSetColor(GREEN);
		iFilledRectangle(450,50,10,50);
		
		iText(290,170, "TRACK FOR PLAYER 1",GLUT_BITMAP_HELVETICA_18);

		iSetColor(0,0,0);
		iFilledRectangle(500,0,10,50);
		iSetColor(WHITE);
		iFilledRectangle(500,50,10,50);

		iSetColor(WHITE);
		iFilledRectangle(660,0,10,50);
		iSetColor(0,0,0);
		iFilledRectangle(660,50,10,50);

		iText(500,170, "TRACK FOR PLAYER 2",GLUT_BITMAP_HELVETICA_18);

		break;

	default:
		iSetColor(RED);
		iFilledRectangle(290,0,10,50);
		iSetColor(WHITE);
		iFilledRectangle(290,50,10,50);

		iSetColor(WHITE);
		iFilledRectangle(450,0,10,50);
	    iSetColor(RED);
		iFilledRectangle(450,50,10,50);
		
		iText(290,170, "TRACK FOR PLAYER 1",GLUT_BITMAP_HELVETICA_18);

		iSetColor(BLUE);
		iFilledRectangle(500,0,10,50);
		iSetColor(WHITE);
		iFilledRectangle(500,50,10,50);

		iSetColor(WHITE);
		iFilledRectangle(660,0,10,50);
		iSetColor(BLUE);
		iFilledRectangle(660,50,10,50);

		iText(500,170, "TRACK FOR PLAYER 2",GLUT_BITMAP_HELVETICA_18);
		break;
	}



}
void polar_draw()
{
	int i,fxpos,mx,my,func_serial,arrayi;
	int lekhay=405;
	int axisi=1;
	int xaxisx,temp2;
	char buffer[10];
	double p1,p2,p3,p4;
	iSetColor(0,0,255);
	iShowBMP(0,0,"hipparchus.bmp");
	iSetColor(0,0,0);
	iFilledRectangle(0,0,670,700);
	iSetColor(100,100,100);
	iFilledRectangle(51,window_sizeY-620,600,600);
	iSetColor(255,255,255);
	iFilledRectangle(54,window_sizeY-617,594,594);
	iSetColor(0,0,255);
	iSetColor(0,0,0);
	iSetColor(112,128,144);
	mx=(54+594+53)/2;
	my=(window_sizeY-617+594+81)/2;
	alpha = mx;
	beta = my;
	iFilledRectangle(alpha,window_sizeY-617,2,594);
	iFilledRectangle(54,beta,594,2);
	iSetColor(176,196,222);
	for(i=0;i<=540;i=i+60)
	{
		if(i<=300)
			iCircle(alpha,beta,i);
	}
	iShowBMP(730,450,"func_input.bmp");
	iShowBMP(1000,100,"goback.bmp");
	iShowBMP(900,100,"reset.bmp");
	if(zoomflag<4){
		iShowBMP(823,609,"zoom_in.bmp");
	}
	if(zoomflag>0){
		iShowBMP(873,609,"zoom_out.bmp");
	}
	fxpos=399;
	if(current<3){
		iShowBMP(1040,newy1,"new.bmp");
	}
	if(current>1){
		iShowBMP(1080,newy1,"delete.bmp");
	}
	if(current<3||current>1){
		iShowBMP(1120,newy1,"save.bmp");
		iShowBMP(1080,newy1-35,"load.bmp");
	}
	for(func_serial=1;func_serial<=current;++func_serial)
		{
			iShowBMP(700,fxpos,"r=f(D).bmp");
			iFilledRectangle(735,fxpos+1,300,30);
			fxpos-=100;
		}
	iSetColor(0,0,0);
	for(func_serial=1;func_serial<=current;++func_serial){
		iText(750,lekhay,primary[func_serial],GLUT_BITMAP_TIMES_ROMAN_24);
		lekhay=lekhay-100;
	}
	xaxisx=alpha-10;
	for(axisi=0;axisi<6;++axisi){
		temp2=polar[axisi]*axisvalue;
		itoa(temp2,buffer,10);
		
		if(zoomflag==4 && (axisi==1 || axisi==3 || axisi==5)){
			if(axisi==1)iText(xaxisx,beta-8,"1.5");
			else if(axisi==3)iText(xaxisx,beta-8,"4.5");
			else if(axisi==5)iText(xaxisx,beta-8,"7.5");
		}
		else{
			iText(xaxisx,beta-8,buffer);
		}
		xaxisx=xaxisx+56;

	}
	if(calcuflag){
		calculate();
		calculated=current;
	}
		for(func_serial=1;func_serial<=calculated;++func_serial){
		for(arrayi=1;arrayi<=totalarray;++arrayi){
			finalx[func_serial][arrayi]=xvalue[func_serial][arrayi]*(zoom)+alpha;
			finaly[func_serial][arrayi]=yvalue[func_serial][arrayi]*(zoom)+beta;
		}
		for(arrayi=1;arrayi<totalarray;++arrayi){
			p1=finalx[func_serial][arrayi];
			p2=finaly[func_serial][arrayi];
			p3=finalx[func_serial][arrayi+1];
			p4=finaly[func_serial][arrayi+1];
			if(mapvalue[func_serial][arrayi]==0 && mapvalue[func_serial][arrayi+1]==0 && pointcheck(p1,p2,p3,p4)){
				if(func_serial==1) iSetColor(0,100,0);
				else if(func_serial==2) iSetColor(255,0,0);
				else if(func_serial==3) iSetColor(25,25,112);
				iLine(p1,p2,p3,p4);
			}
			

		}

		}

		if(func_save==1||func_save==2||func_save==3)
		save_points(func_save);
	if(func_load==1||func_load==2||func_load==3){
		load_function(func_load);
		calcuflag=1;
		calculated=func_load;
		func_load=0;
		primlength=1;
	}

}
void cartesian_draw()
{
	int i,mx,my,arrayi,count,fxpos,func_serial,lekhay=405;
	double p1,p2,p3,p4;
	int axisi=1;
	int yaxisy,xaxisx,temp2;
	char buffer[10];
	iSetColor(0,0,255);

	iShowBMP(670,0,"rene_descartes.bmp");
	iSetColor(0,0,0);
	iFilledRectangle(0,0,670,700);
	iSetColor(100,100,100);
	iFilledRectangle(51,window_sizeY-620,600,600);
	iSetColor(255,255,255);
	iFilledRectangle(54,window_sizeY-617,594,594);
	iShowBMP(730,450,"func_input.bmp");
	iShowBMP(1000,100,"goback.bmp");
	iShowBMP(900,100,"reset.bmp");
	if(zoomflag<4){
		iShowBMP(823,609,"zoom_in.bmp");
	}
	if(zoomflag>0){
		iShowBMP(873,609,"zoom_out.bmp");
	}
	fxpos=399;
	if(current<3){
		iShowBMP(1040,newy1,"new.bmp");
	}
	if(current>1){
		iShowBMP(1080,newy1,"delete.bmp");
	}
	if(current<3||current>1){
		iShowBMP(1120,newy1,"save.bmp");
		iShowBMP(1080,newy1-35,"load.bmp");
	}
	for(func_serial=1;func_serial<=current;++func_serial)
		{
			iShowBMP(700,fxpos,"y=f(x).bmp");
			iSetColor(204,255,153);
			iFilledRectangle(735,fxpos+1,300,30);
			fxpos-=100;
		}
	iSetColor(230,230,250);
	count=0;
	for(i=-3;(594-i)>0;i=i+10)
	{
		if(count%10==0) iSetColor(105,105,105);
		iRectangle(54+i,window_sizeY-617,594-i,594);
		count++;
		iSetColor(230,230,250);
	}
	iSetColor(230,230,250);
	count=0;
	for(i=-3;(594-i)>0;i=i+10)
	{
		if(count%10==0) iSetColor(205,133,63);
		iRectangle(54,window_sizeY-617+i,594,594-i);
		count++;
		iSetColor(230,230,250);
	}
	iSetColor(72,61,139);
	mx=(54+594+55)/2;
	my=(window_sizeY-617+594+82)/2;
	alpha = mx;
	beta = my;
	iFilledRectangle(mx,window_sizeY-617,2,594);
	iFilledRectangle(54,my,594,2);
	iSetColor(255,255,255);
	iFilledRectangle(50,window_sizeY-640,601,20);
	iFilledRectangle(12,window_sizeY-618,38,600);
	iSetColor(0,0,0);
	iRectangle(50,window_sizeY-640,601,22);
	iRectangle(12,window_sizeY-618,38,600);
	for(func_serial=1;func_serial<=current;++func_serial){
		iText(750,lekhay,primary[func_serial],GLUT_BITMAP_TIMES_ROMAN_24);
		lekhay=lekhay-100;
	}
	yaxisy=673;
	for(axisi=0;axisi<7;++axisi){
		temp2=axis[axisi]*axisvalue;
		itoa(temp2,buffer,10);
		
		if(zoomflag==4 && (axisi==0 || axisi==6 || axisi==2 || axisi==4)){
			if(axisi==0){
				iText(18,yaxisy,"7.5");
			}
			else if(axisi==6){
				iText(18,yaxisy,"-7.5");
			}
			else if(axisi==4){
				iText(18,yaxisy,"-2.5");
			}
			else if(axisi==2){
				iText(18,yaxisy,"2.5");
			}
		}
		else{
			iText(18,yaxisy,buffer);
		}
		yaxisy=yaxisy-98;

	}
	xaxisx=53;
	for(axisi=6;axisi>=0;--axisi){
		temp2=axis[axisi]*axisvalue;
		itoa(temp2,buffer,10);
		
		if(zoomflag==4 && (axisi==0 || axisi==6 || axisi==2 || axisi==4)){
			if(axisi==0){
				iText(xaxisx,70,"7.5");
			}
			else if(axisi==6){
				iText(xaxisx,70,"-7.5");
			}
			else if(axisi==4){
				iText(xaxisx,70,"-2.5");
			}
			else if(axisi==2){
				iText(xaxisx,70,"2.5");
			}
		}
		else{
			iText(xaxisx,70,buffer);
		}
		xaxisx=xaxisx+98;

	}
	iText(54,360,"X' ",GLUT_BITMAP_TIMES_ROMAN_24);
	iText(625,360,"X ",GLUT_BITMAP_TIMES_ROMAN_24);
	iText(330,360,"O ",GLUT_BITMAP_TIMES_ROMAN_24);
	iText(330,656,"Y ",GLUT_BITMAP_TIMES_ROMAN_24);
	iText(328,85,"Y' ",GLUT_BITMAP_TIMES_ROMAN_24);


	if(calcuflag){
		calculate();
		calculated=current;
	}
		for(func_serial=1;func_serial<=calculated;++func_serial){
		for(arrayi=1;arrayi<=totalarray;++arrayi){
			finalx[func_serial][arrayi]=xvalue[func_serial][arrayi]*(zoom)+alpha;
			finaly[func_serial][arrayi]=yvalue[func_serial][arrayi]*(zoom)+beta;
		}
		for(arrayi=1;arrayi<totalarray;++arrayi){
			p1=finalx[func_serial][arrayi];
			p2=finaly[func_serial][arrayi];
			p3=finalx[func_serial][arrayi+1];
			p4=finaly[func_serial][arrayi+1];
			if(mapvalue[func_serial][arrayi]==0 && mapvalue[func_serial][arrayi+1]==0 && pointcheck(p1,p2,p3,p4)){
				if(func_serial==1) iSetColor(0,100,0);
				else if(func_serial==2) iSetColor(255,0,0);
				else if(func_serial==3) iSetColor(25,25,112);
				iLine(p1,p2,p3,p4);
			}
		}

		}
			
	if(func_save==1||func_save==2||func_save==3)
		//iText(300,200,primary[func_save]);
		save_points(func_save);
	if(func_load==1||func_load==2||func_load==3){
		load_function(func_load);
		calcuflag=1;
		calculated=func_load;
		func_load=0;
		primlength=1;
	}


}
示例#12
0
void iDraw()
{
	int m,n;
	iClear();
	iSetcolor(1,1,1);
	iFilledRectangle(1,1,width-19,height-18);		//draw text box
	iSetcolor(0,0,0);
	iRectangle(1,1,width-19,height-19);				//draw text boundary

	if (selflag)
	{
		for (int l=selSI; l<=selEI; l++)
		{
			int sx = (l==selSI)?( (selSJ==0)?3:selSJ*charSpace) : 3;
			int sy = height - 17 - (l+1-s)*lineSpace - 5;
			int w;
			if (l==selSI)
				w = (selSI == selEI) ? selEJ-selSJ : strlen(str+l*charMax*sizeof(char))-selSJ;
			else if (l==selEI)
				w = selEJ;
			else
				w = (strlen(str+l*charMax*sizeof(char))==0)?1:strlen(str+l*charMax*sizeof(char));

			iSetcolor(.8,.8,.9);
			iFilledRectangle(sx,sy,w*charSpace,lineSpace);
		}
	}

	iSetcolor(0,0,0);
	for (m=height-17-lineSpace, n=s; n<=imax; m-=lineSpace, n++)
	{
		iText(3, m, str+n*charMax*sizeof(char),font);		//print text
	}

	if (fOpen)
	{
		fileopen();
		iSetcolor(0,0,0);
		iText((width-15)/2-135,(height-19)/2+62,subTemp+r);		//print file open text
	}
	else if (fsave)
	{
		filesave();
		iSetcolor(0,0,0);
		iText((width-15)/2-135,(height-19)/2+62,subTemp+r);	//print file save as text
	}
	else if (aboutR)
	{
		aboutRword();
	}

	cursor();							//draw cursor		

	iSetcolor(.9,.9,.9);
	iFilledRectangle(3,height-17,width-19,17);

	iSetcolor(0,0,0);
	iLine(2,height-18,width-19,height-18);

	iSetcolor(0,0,0);
	iText(5,height-12,"File",GLUT_BITMAP_HELVETICA_12);			

	iSetcolor(0,0,0);
	iText(45,height-12,"Edit",GLUT_BITMAP_HELVETICA_12);

	iSetcolor(0,0,0);
	iText(85,height-12,"Format",GLUT_BITMAP_HELVETICA_12);

	iSetcolor(0,0,0);
	iText(141,height-12,"Help",GLUT_BITMAP_HELVETICA_12);		//draw menus
		
	if (menuflag == 1)
	{
		fileMenu();					//draw file drop down menu
	}
	else if (menuflag == 2)
	{
		editMenu();					//draw edit drop down menu
	}
	else if (menuflag == 3)
	{
		formatMenu();				//draw format drop down menu
	}
	else if (menuflag == 4)
	{
		helpMenu();					//draw help drop down menu
	}


	if (fontflag)
	{
		fontlist();						//draw font list
	}
	else if (saveM)
	{
		saveMessage();			//message box while exitting
	}

	scrollbar();                  // draw scrollbar



	if (load)
		loading();				//load window
}