Subversion Repositories Kolibri OS

Rev

Rev 7278 | Rev 7491 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7278 Rev 7462
Line 1... Line 1...
1
dword col_palette[14] = {0xD2D3D3,0xD4D4D4,0xD6D5D6,0xD8D7D8,0xDAD8D9,0xDCDADB,0xDFDCDD,0xE1DDDE,0xE2DEE0,0xE4DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1};
1
dword col_work_gradient[14];
Line 2... Line 2...
2
 
2
 
3
void Scroll() {
3
void Scroll() {
Line 4... Line 4...
4
	dword i;
4
	dword i;
Line 21... Line 21...
21
		if (sc_slider_h > sc_h-sc_slider_y+56) || (files.first+files.visible>=files.count) sc_slider_y= sc_y + sc_h - sc_slider_h - 1; //äëÿ áîëüøîãî ñïèñêà 
21
		if (sc_slider_h > sc_h-sc_slider_y+56) || (files.first+files.visible>=files.count) sc_slider_y= sc_y + sc_h - sc_slider_h - 1; //äëÿ áîëüøîãî ñïèñêà 
22
	}
22
	}
23
	//slider
23
	//slider
24
	DrawRectangle(sc_x,sc_slider_y,16,sc_slider_h,col_graph);
24
	DrawRectangle(sc_x,sc_slider_y,16,sc_slider_h,col_graph);
25
	DrawRectangle3D(sc_x+1,sc_slider_y+1,14,sc_slider_h-2,0xFEFEFE,col_padding);
25
	DrawRectangle3D(sc_x+1,sc_slider_y+1,14,sc_slider_h-2, system.color.work_light , system.color.work_dark);
26
	if (!scroll_used) for (i=0; i<13; i++) DrawBar(sc_x + 2 + i, sc_slider_y+2, 1, sc_slider_h-3, col_palette[13-i]);
26
	if (!scroll_used) for (i=0; i<13; i++) DrawBar(sc_x + 2 + i, sc_slider_y+2, 1, sc_slider_h-3, col_work_gradient[13-i]);
27
	if (scroll_used)  for (i=0; i<13; i++) DrawBar(sc_x + 2 + i, sc_slider_y+2, 1, sc_slider_h-3, col_palette[i]);
27
	if (scroll_used)  for (i=0; i<13; i++) DrawBar(sc_x + 2 + i, sc_slider_y+2, 1, sc_slider_h-3, col_work_gradient[i]);
28
	//area before slider
28
	//area before slider
29
	if (sc_slider_y > sc_y + 1) 
29
	if (sc_slider_y > sc_y + 1) 
30
	{
30
	{
31
		DrawBar(sc_x+1, sc_y,   15, 1, 0xC7C9C9);
31
		DrawBar(sc_x+1, sc_y,   15, 1, 0xC7C9C9);
32
		DrawBar(sc_x+1, sc_y+1,  1, sc_slider_y-sc_y-1, 0xC7C9C9);
32
		DrawBar(sc_x+1, sc_y+1,  1, sc_slider_y-sc_y-1, 0xC7C9C9);
33
		DrawBar(sc_x+2, sc_y+1, 14, sc_slider_y-sc_y-1, 0xCED0D0);
33
		DrawBar(sc_x+2, sc_y+1, 14, sc_slider_y-sc_y-1, 0xCED0D0);
Line 43... Line 43...
43
 
43
 
Line 44... Line 44...
44
void DrawFlatButtonSmall(dword x,y,width,height,id,text)
44
void DrawFlatButtonSmall(dword x,y,width,height,id,text)
45
{
45
{
46
	DrawRectangle(x,y,width,height,col_graph);
46
	DrawRectangle(x,y,width,height,col_graph);
47
	DrawRectangle3D(x+1,y+1,width-2,height-2,0xFEFEFE,col_padding);
47
	DrawRectangle3D(x+1,y+1,width-2,height-2, system.color.work_light , system.color.work_dark);
48
	PutPixel(x+width-1, y+1, col_padding);
48
	PutPixel(x+width-1, y+1, system.color.work_dark);
49
	DrawFilledBar(x+2, y+2, width-3, height-3);
49
	DrawFilledBar(x+2, y+2, width-3, height-3);
50
	if (id) DefineButton(x+1,y+1,width-2,height-2,id+BT_HIDE,0xEFEBEF);
50
	if (id) DefineHiddenButton(x+1,y+1,width-2,height-2,id);
51
	WriteText(-strlen(text)*6+width/2+x+1,height/2+y-3,0x80,0x333333,text);
51
	WriteText(-strlen(text)*6+width/2+x+1,height/2+y-3,0x80,system.color.work_text,text);
52
}
52
}
Line 53... Line 53...
53
 
53
 
54
void DrawFilledBar(dword x, y, w, h)
54
void DrawFilledBar(dword x, y, w, h)
55
{
55
{
56
	int i, fill_h;
56
	int i, fill_h;
57
	if (h <= 14) fill_h = h; else fill_h = 14;
57
	if (h <= 14) fill_h = h; else fill_h = 14;
58
	for (i=0; i
58
	for (i=0; i
59
	DrawBar(x, y+i, w, h-fill_h, col_palette[14-i]);
59
	DrawBar(x, y+i, w, h-fill_h, col_work_gradient[14-i]);
Line 60... Line 60...
60
}
60
}
61
 
61
 
62
int popin_w=260;
62
int popin_w=260;
Line 67... Line 67...
67
	DrawPopup(popin_x, 160, popin_w, 95, 1, system.color.work, col_graph);
67
	DrawPopup(popin_x, 160, popin_w, 95, 1, system.color.work, col_graph);
68
	but_x = DrawStandartCaptButton(popin_x+23, 215, POPUP_BTN1, b1_text);
68
	but_x = DrawStandartCaptButton(popin_x+23, 215, POPUP_BTN1, b1_text);
69
	DrawStandartCaptButton(popin_x+23 + but_x, 215, POPUP_BTN2, b2_text);
69
	DrawStandartCaptButton(popin_x+23 + but_x, 215, POPUP_BTN2, b2_text);
70
}
70
}
71
>
71
 
72
72
void DrawDot(dword x,y) {
-
 
73
	dword col_pxl = MixColors(col_graph, col_work, 60);
-
 
74
	DrawBar(x+1,y,2,4,col_graph);
-
 
75
	DrawBar(x,y+1,4,2,col_graph);
-
 
76
	PutPixel(x,y,col_pxl);
-
 
77
	PutPixel(x+3,y,col_pxl);
-
 
78
	PutPixel(x,y+3,col_pxl);
-
 
79
	PutPixel(x+3,y+3,col_pxl);
-
 
80
}
-
 
81
>
-
 
82
73
83