void menu(int l)
{
	box(GREEN);

	_setcursortype(_NOCURSOR);

	gotoxy(37,3);textcolor(WHITE); cprintf("Wizard");
	gotoxy(35,5);
	textcolor(YELLOW);
	cprintf(" AGRAGAMI");

	gotoxy(30,7);
	textcolor(WHITE);
	cprintf("Hindi Font Convertor");
	gotoxy(2,9);   textbackground(RED);	textcolor(YELLOW);	cprintf("-----------------------------------------------------------------------------");
	for(int i=0;i<=10;i++)
	{gotoxy(2,10+i);   textbackground(BLACK);	textcolor(YELLOW);	cprintf("                                                                             ");}

	textbackground(RED);gotoxy(2,21);	textcolor(YELLOW);	cprintf("-----------------------------------------------------------------------------");

	textbackground(GREEN);	gotoxy(68,23);	textcolor(YELLOW); cprintf("ESC. ");
	textcolor(WHITE);  cprintf("Close");

	char menu[10][100],menuh[10][100];

	strcpy(menu[1],"1 => Retrieving Data.         ");
	strcpy(menuh[1],"Press [Enter] to continue...");
	strcpy(menu[2],"2 => Select Input File Font. ");
	strcpy(menuh[2],"Choose input file font.                                    ");
	strcpy(menu[3],"3 => Select Output File Font.");
	strcpy(menuh[3],"Choose output file font.                                   ");
	strcpy(menu[4],"4 => Convert Data.        ");
	strcpy(menuh[4],"Converting Data.                                           ");
	strcpy(menu[5],"5 => Show Converted Data.       ");
	strcpy(menuh[5],"                               ");
	for(i=1;i<=5;i++)
		{

		textbackground(BLACK);

		textcolor(WHITE);

		lowvideo();
		if(i==l)
		       {
			highvideo();
			gotoxy(4,23);
			textbackground(GREEN);
			cprintf(menuh[i]);
			textbackground(BLUE);
		       }

		gotoxy(4,9+2*i);
		cprintf(menu[i]);
		}
			normvideo();
	}
Esempio n. 2
0
void BOX::textbox(const string &msg) const
{
    textcolor(color);
    textbackground(bgcolor);
    highvideo();
    draw_box();
    cout << setxy(left+2, top+1) << msg;
    normvideo();
}
Esempio n. 3
0
 void main()
{clrscr();
 char name[20],club[15],f[13][20],nation[15],dob[15];
 cout<<"\t\t\tWORLD'S BEST 3 FOOTBALL CLUBS\n\n";
 highvideo();
 {
 textcolor(8);
 cout<<"      ";
 cprintf("Real Madrid");
 cout<<"\t\t";
 cprintf("FC Barcelona");
 cout<<"\t\t";
 cprintf("Manchester United");
 }
 cout<<"\n\nEnter your name : ";
 gets(name);
 cout<<"\nEnter your nation : ";
 cin>>nation;
 cout<<"\nEnter your Date of birth(dd/mm/yy) : ";
 gets(dob);
 cout<<"\n\nChoose the team which you want to coach : ";
 gets(club);
 clrscr();
 cout<<"\nCongrats!!!\nYou have been chosen as the manager of "<<club;
 ifstream ifile;
{ if(strcmp(club,"Real Madrid")==0)
 {ifile.open("RM",ios::in|ios::binary);}
else if(strcmp(club,"FC Barcelona")==0)
 {ifile.open("FCB",ios::in|ios::binary);}
else if(strcmp(club,"Manchester United")==0)
 {ifile.open("MU",ios::in|ios::binary);  }
else
{exit(0);}
}

 ifile.read((char*)&f,sizeof(f));
   for(int i=0;i<13;i++)
   {cout<<"\n";
   for(int j=0;j<20;j++)
   cout<<f[i][j];
   }
   cout<<"\t\tManager : "<<name<<endl;
 ifile.close();
 getch();
 clrscr();
 cout<<"\n\t\t\t\tCONTRACT AGREEMENT\n\n";
 cout<<club<<" club is signing you for 1 year";
 cout<<

 getch();
 }
Esempio n. 4
0
static JSBool js_set(JSContext *cx, JSObject *obj, jsid id, JSBool strict, jsval *vp)
{
	jsval idval;
    jsint		tiny;
	int32		i=0;
	JSBool		b;
	jsrefcount	rc;

    JS_IdToValue(cx, id, &idval);
    tiny = JSVAL_TO_INT(idval);

	switch(tiny) {
		case PROP_WSCROLL:
			JS_ValueToBoolean(cx, *vp, &_wscroll);
			break;
		case PROP_DIRECTVIDEO:
			JS_ValueToBoolean(cx, *vp, &directvideo);
			break;
		case PROP_HOLD_UPDATE:
			JS_ValueToBoolean(cx, *vp, &hold_update);
			break;
		case PROP_PUTTEXT_CAN_MOVE:
			JS_ValueToBoolean(cx, *vp, &puttext_can_move);
			break;
		case PROP_ESCDELAY:
			if(cio_api.ESCDELAY) {
				if(!JS_ValueToInt32(cx, *vp, (int32*)cio_api.ESCDELAY))
					return JS_FALSE;
			}
			break;
		case PROP_TEXTATTR:
			if(!JS_ValueToInt32(cx, *vp, &i))
				return JS_FALSE;
			rc=JS_SUSPENDREQUEST(cx);
			textattr(i);
			JS_RESUMEREQUEST(cx, rc);
			break;
		case PROP_WHEREX:
			if(!JS_ValueToInt32(cx, *vp, &i))
				return JS_FALSE;
			rc=JS_SUSPENDREQUEST(cx);
			gotoxy(i, cio_textinfo.cury);
			JS_RESUMEREQUEST(cx, rc);
			break;
		case PROP_WHEREY:
			if(!JS_ValueToInt32(cx, *vp, &i))
				return JS_FALSE;
			rc=JS_SUSPENDREQUEST(cx);
			gotoxy(cio_textinfo.curx, i);
			JS_RESUMEREQUEST(cx, rc);
			break;
		case PROP_TEXTMODE:
			if(!JS_ValueToInt32(cx, *vp, &i))
				return JS_FALSE;
			rc=JS_SUSPENDREQUEST(cx);
			textmode(i);
			JS_RESUMEREQUEST(cx, rc);
			break;
		case PROP_TEXTBACKGROUND:
			if(!JS_ValueToInt32(cx, *vp, &i))
				return JS_FALSE;
			rc=JS_SUSPENDREQUEST(cx);
			textbackground(i);
			JS_RESUMEREQUEST(cx, rc);
			break;
		case PROP_TEXTCOLOR:
			if(!JS_ValueToInt32(cx, *vp, &i))
				return JS_FALSE;
			rc=JS_SUSPENDREQUEST(cx);
			textcolor(i);
			JS_RESUMEREQUEST(cx, rc);
			break;
		case PROP_CLIPBOARD:
			{
				size_t	len;
				char	*bytes;

				JSVALUE_TO_MSTRING(cx, *vp, bytes, &len);
				HANDLE_PENDING(cx);
				if(!bytes)
					return JS_FALSE;
				rc=JS_SUSPENDREQUEST(cx);
				copytext(bytes, len+1);
				free(bytes);
				JS_RESUMEREQUEST(cx, rc);
			}
			break;
		case PROP_HIGHVIDEO:
			JS_ValueToBoolean(cx, *vp, &b);
			rc=JS_SUSPENDREQUEST(cx);
			if(b)
				highvideo();
			else
				lowvideo();
			JS_RESUMEREQUEST(cx, rc);
			break;
		case PROP_LOWVIDEO:
			JS_ValueToBoolean(cx, *vp, &b);
			rc=JS_SUSPENDREQUEST(cx);
			if(b)
				lowvideo();
			else
				highvideo();
			JS_RESUMEREQUEST(cx, rc);
			break;
	}

	return(JS_TRUE);
}
int main(int argc, char *argv[])
{
   char cad[80];
   char destin[4096];
   int i;
   
   clrscr();
   textbackground(BLUE);
   textcolor(YELLOW);
   clrscr();
   getch();
   window(2,2,77,22);
   textbackground(RED);
   textcolor(LIGHTBLUE);
   clrscr();
   gotoxy(1,3); cprintf("Prueba");
   getch();
   window(3,3,76,21);
   textbackground(LIGHTBLUE);
   textcolor(CYAN);
   clrscr();
   gotoxy(1,3); cputs("Otra prueba");
   for(i = 0; i < 100; i++) cputs("111");
   highvideo();
   for(i = 0; i < 100; i++) cputs("222");
   lowvideo();
   for(i = 0; i < 100; i++) cputs("333");
   highvideo();
   for(i = 0; i < 100; i++) cputs("444");
   lowvideo();
   for(i = 0; i < 100; i++) cputs("555");
   highvideo();
   for(i = 0; i < 100; i++) cputs("666");
   getch();
   gotoxy(10, 12); cputs("aqui");
   getch();
   delline();
   getch();
   gotoxy(10, 1); cputs("aqui");
   getch();
   delline();
   getch();
   gotoxy(10, 15); cputs("aqui");
   getch();
   delline();
   getch();
   normvideo();
   for(i = 0; i < 500; i++) putch('*');
   getch();
   gotoxy(10, 4); cputs("aqui");
   getch();
   insline();
   cputs("insertada");
   getch();
   gotoxy(1, 7);
   cputs("Leer una cadena: ");
   cad[0]=10;
   cgets(cad);
   gotoxy(1, 8);
   cprintf("caracteres leidos: %d, cadena %s #relleno relleno relleno "
	   "relleno###########################", (int)cad[1], &cad[2]);
   clreol();
   getch();
   strcpy(cad, getpass("clave: ")); 
   cprintf("clave leida: %s", cad);
   getch();
   gettext(2, 2, 74, 19, destin);
   clrscr();
   getch();
   puttext(1, 1, 73, 18, destin);  
   getch();
   textbackground(BLUE);
   textcolor(WHITE);
   window(10,10,15,15);
   getch();
   normvideo();
   textcolor(WHITE);
   textbackground(BLACK);
   window(1,1,80,25);
   gotoxy(1,1);
   return 0;
}
Esempio n. 6
0
void main() {
    // clrscr
    uint8_t color;
    uint8_t bg;
    uint8_t x, y;
    uint8_t a;
    uint16_t b;
    char c;
    char *vram;
    unsigned char index;
    char buffer[20];
    unsigned char offs;

    // links, oben, rechts, unten
    window(3, 3, 30, 30);
    clrscr();
    for (color = 0; color < 16; color++) {
        textcolor(color);
        for (bg = 0; bg < 8; bg++) {
            textbackground(bg);
            cstbt(0x1b);
        }
        cputs("  Hello KC85!\r\n");
    }
    x = wherex();
    y = wherey();

    gotoxy(0, 3);
    delline();
    gotoxy(0, 5);
    delline();
    cputs("test");

    gotoxy(x, y);

    c = getche();
    putch(c);
    crlf();

    // kbhit

    textcolor(BROWN);
    clrscr();

    for (index = 0; index < 20; index++) {
        if ((index & 0x01) == 0x01)
            highvideo();
        else
            lowvideo();
        cputs("press key\r\n");
    }
    textcolor(WHITE);

    while (kbhit())
        cputs("you have touched key.\r\n");
    cputs("done\r\n");
    next();

    // delline
    cputs("This line will be deleted. press key.");
    getch();
    delline();
    cputs("Line deleted successfully.");
    getch();
    crlf();

    // inlin

    cputs("Zeug eingeben: ");
    offs = wherex();
    vram = inlin();
    vram += offs;
    crlf();

    index = 0;
    while (*vram != '\0') {
        buffer[index] = *vram;
        index++;
        vram++;
    }
    ahex(index);
    while (index > 0) {
        index--;
        ahex(buffer[index]);
        space();
    }
    next();
    crlf();

    // cgets
    cputs("Zeug eingeben: ");
    buffer[0] = 10;
    vram = cgets(buffer);
    crlf();
    delline();
    index = buffer[1];
    ahex(index);
    space();
    space();

    while (index > 0) {
        index--;
        ahex(*vram);
        space();
        vram++;
    }
    ahex(*vram);
    crlf();

    // add test
    a = sqr(100);
    b = puse(10, 10, 10);
    b = b + a;
    hlhx(b);
    crlf();
}