Subversion Repositories Kolibri OS

Rev

Rev 3447 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3363 leency 1
char *ext[]={
2
"..",   17,
3
"",16,
3372 leency 4
"txt", 1, "doc", 1, "rtf", 1, "odt", 1, "log", 1, "docx",1,
5
"htm", 2, "html",2, "mht", 2,
6
"ini", 3, "js",  3, "conf",3, "inf", 3,
7
"xlt", 4, "xls", 4, "ods", 4, "xlsx",4,
8
"cmd", 5, "bat", 5, "py",  5, "sh",  5, "ksh", 5, "com", 5,
9
"kex", 6, "lua", 6,
10
"exe", 7, "msi", 7,
11
"sys", 8, "ocx", 8, "drv", 8, "so",  8,
3363 leency 12
"inc", 9,
3372 leency 13
"chr", 10, "mt",  10, "ttf", 10, "fon", 10,
3363 leency 14
"asm", 11,
3372 leency 15
"mp3", 12, "wav", 12, "mid", 12, "midi",12, "ogg", 12, "wma", 12, "flac",12,
3363 leency 16
"skn", 13,
3372 leency 17
"avi", 14, "flv", 14, "mpg", 14, "wmv", 14, "mov", 14, "mkv", 14, "mp4", 14, "vob", 14, "webm", 14,
18
"djvu",15, "pdf", 15, "fb2", 15,
19
"nes", 18, "smc", 18,
20
"gif", 19, "bmp", 19, "tga", 19, "pcx", 19, "png", 19, "pnm", 19, "jpg", 19, "xcf", 19, "ai",  19,
21
"jpeg",19, "raw", 19, "psd", 19, "wbmp",19, "tiff",19, "tif", 19,
22
"3ds", 20, "ico", 20, "cur", 20, "ani", 20, "vox", 20,
23
"img", 21, "ima", 21,
24
"dll", 22, "obj", 22, "dict",22,
25
"rar", 23, "zip", 23, "cab", 23, "tar", 23, "ajr", 23, "jar", 23, "7z",  23, "gz",  23,
26
"iso", 24, "cue", 24, "nrg", 24, "mdf", 24,
3363 leency 27
"grf", 25,
28
0,0};
29
 
30
 
31
#include "imgs\icons.txt"
32
 
33
void Put_icon(dword extension, yy, fairing_color)
34
{
35
	int icon_n=0, i;
3372 leency 36
	for (i=0; ext[i]!=0; i+=2;)	if (!strcmp(extension, ext[i]))	{ icon_n = ext[i+1]; break;	}
3363 leency 37
 
4038 leency 38
	ficons_pal[0] = fairing_color;
3447 leency 39
	PutPaletteImage(icon_n*16*15+#ficons,16,15,files.x+3,yy,8,#ficons_pal);
4038 leency 40
	if (fairing_color!=0xFFFfff) IconFairing(icon_n, files.x+3, yy, fairing_color);
3372 leency 41
	if (icon_n<>17) && (strlen(extension)<9) WriteText(-strlen(extension)*3+Form.cwidth-120,yy+4,0x80,0,extension);
3363 leency 42
}
43
 
44
 
4038 leency 45
void IconFairing(dword filenum, x,y, color)
3363 leency 46
{
47
	switch(filenum)
48
	{
4038 leency 49
		case 0...1: //file
50
		case 3: //настройки
3363 leency 51
			RIGHT_PAINT:
52
			DrawBar(205,y,4,1,color);
53
			DrawBar(206,y+1,3,1,color);
54
			DrawBar(207,y+2,2,1,color);
55
			PutPixel(208,y+3,color);
56
			return;
57
		case 2: //html
58
			DrawBar(195,y,1,7,color);
59
			DrawBar(196,y,1,6,color);
60
			DrawBar(195,y+10,1,5,color);
61
			DrawBar(196,y+11,1,4,color);
62
			GOTO RIGHT_PAINT;
63
		case 9: //inc
64
			DrawBar(208,y,1,3,color);
65
			DrawBar(209,y,2,4,color);
66
			DrawBar(210,y,1,15,color);
67
			PutPixel(198,y+14,color);
68
			DrawBar(199,y+13,1,2,color);
69
			DrawBar(200,y+12,10,3,color);
70
			PutPixel(205,y+11,color);
71
			DrawBar(206,y+10,1,2,color);
72
			DrawBar(207,y+9,1,3,color);
73
			PutPixel(207,y+7,color);
74
			DrawBar(208,y+6,2,7,color);
75
			PutPixel(209,y+5,color);
76
			return;
77
		case 10: //font
78
			DrawBar(196,y+1,1,13,color);
79
			DrawBar(197,y+1,1,11,color);
80
			DrawBar(198,y+1,1,10,color);
81
			DrawBar(199,y+1,1,9,color);
82
			DrawBar(200,y+1,1,7,color);
83
			DrawBar(201,y+1,1,5,color);
84
			DrawBar(202,y+1,1,4,color);
85
			DrawBar(203,y+1,1,2,color);
86
			DrawBar(209,y+1,1,13,color);
87
			DrawBar(208,y+1,1,11,color);
88
			PutPixel(204,y+6,color);
89
			DrawBar(203,y+10,2,1,color);
90
			DrawBar(202,y+11,2,3,color);
91
			return;
92
		case 12: //audio
4038 leency 93
			PutPixel(x+2,y+9,color);
94
			PutPixel(x+1,y+10,color);
95
			PutPixel(x+10,y+8,color);
96
			PutPixel(x+9,y+9,color);
97
 
98
			PutPixel(x+6,y+13,color);
99
			PutPixel(x+5,y+14,color);
100
			PutPixel(x+14,y+12,color);
101
			PutPixel(x+13,y+13,color);
3363 leency 102
			return;
103
		case 13: //skin
104
			PutPixel(210,y,color);
105
			return;
4038 leency 106
		case 16...17: //folder
3363 leency 107
			DrawBar(195,y,1,15,color);
108
			DrawBar(203,y,8,2,color);
4038 leency 109
			IF (filenum==17) PutPixel(206,y+1,0x1A7B17); //green arrow part
3363 leency 110
			DrawBar(196,y+13,15,2,color);
111
			PutPixel(196,y,color); //.точки
112
			PutPixel(202,y,color);
113
			PutPixel(210,y+2,color);
114
			PutPixel(196,y+12,color);
115
			PutPixel(210,y+12,color);
116
			return;
117
		case 18: //картридж
118
			DrawBar(195,y+11,1,2,color);
119
			DrawBar(210,y+11,1,2,color);
4038 leency 120
			DrawBar(195,y+13,16,1,color);
3363 leency 121
			return;
122
		case 24: //образ
123
			DrawBar(195,y,6,1,color);
124
			DrawBar(195,y+1,4,1,color);
125
			DrawBar(195,y+2,3,1,color);
126
			DrawBar(195,y+3,2,2,color);
127
 
128
			DrawBar(195,y+5,1,5,color);
129
 
130
			DrawBar(195,y+10,2,2,color);
131
			DrawBar(195,y+12,3,1,color);
132
			DrawBar(195,y+13,4,1,color);
133
			DrawBar(195,y+14,6,1,color);
134
 
135
			DrawBar(195+11,y,5,1,color);
136
			DrawBar(195+13,y+1,3,1,color);
137
			DrawBar(195+14,y+2,2,1,color);
138
			DrawBar(195+15,y+3,1,2,color);
139
 
140
			DrawBar(195+15,y+10,1,2,color);
141
			DrawBar(195+14,y+12,2,1,color);
142
			DrawBar(195+13,y+13,3,1,color);
3372 leency 143
			DrawBar(195+11,y+14,5,1,color);
3363 leency 144
	}
145
}