int sort_menu int window 80 textbackground YELLOW clrscr for window so

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
int sort_menu()
{
int i;
window(1,1,80,1);
textbackground(YELLOW);
clrscr();
for(i=0;i<2;i++)
{
window(sort_cors[i][0],sort_cors[i][1],sort_cors[i][0]+40,sort_cors[i][1]);
textbackground(i==pos2?GREEN:YELLOW);
textcolor(i==pos2?BLACK:RED);
clrscr();
cprintf("%s",sort_name[i]);
}
return 0;
}
int sort_war()
{
int key;
int n;
int pole=0;
key=getch();
if(key!=0)
switch(key)
{
case 77:pos2=sort_pos[pos2][1];pole=1;break;
case 75:pos2=sort_pos[pos2][0];pole=2;break;
case 13:sort(pole);
window(22,8,60,20);
textbackground(GREEN);
textcolor(WHITE);
clrscr();
gotoxy(15,7);
printf("GOTOVO");getch();
break;
case 27:exit(0);
case 59:clrscr();
window(1,1,80,25);
textbackground(BLUE);
textcolor(WHITE);
clrscr();
file();
getch();
clrscr();
true();
menu();
break;
case 64:matreshka();break;
case 66:del();getch();true();menu();break;
}
return pole;
}
int filtr_menu()
{
int i;
window(1,1,80,1);
textbackground(YELLOW);
clrscr();
for(i=0;i<2;i++)
{
window(sort_cors[i][0],sort_cors[i][1],sort_cors[i][0]+40,sort_cors[i][1]);
textbackground(i==pos2?GREEN:YELLOW);
textcolor(i==pos2?BLACK:RED);
clrscr();
cprintf("%s",filtr_name[i]);
}
return 0;
}