Subversion Repositories Kolibri OS

Rev

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

Rev 7491 Rev 7634
Line 1... Line -...
1
dword col_work_gradient[14];
-
 
2
 
-
 
3
void Scroll() {
1
void Scroll() {
4
	dword i;
2
	dword i;
Line 5... Line 3...
5
 
3
 
6
	word sc_x = files.x + files.w;
4
	word sc_x = files.x + files.w;
Line 20... Line 18...
20
		if (sc_slider_h < 20) sc_slider_h = 20; //minimal scroll width
18
		if (sc_slider_h < 20) sc_slider_h = 20; //minimal scroll width
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; //äëÿ áîëüøîãî ñïèñêà 
19
		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
	}
20
	}
23
	//slider
21
	//slider
24
	DrawRectangle(sc_x,sc_slider_y,16,sc_slider_h,col_graph);
22
	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, system.color.work_light , system.color.work_dark);
23
	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_work_gradient[13-i]);
24
	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_work_gradient[i]);
25
	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
26
	//area before slider
29
	if (sc_slider_y > sc_y + 1) 
27
	if (sc_slider_y > sc_y + 1) 
30
	{
28
	{
31
		DrawBar(sc_x+1, sc_y,   15, 1, 0xC7C9C9);
29
		DrawBar(sc_x+1, sc_y,   15, 1, col.slider_bg_left);
32
		DrawBar(sc_x+1, sc_y+1,  1, sc_slider_y-sc_y-1, 0xC7C9C9);
30
		DrawBar(sc_x+1, sc_y+1,  1, sc_slider_y-sc_y-1, col.slider_bg_left);
33
		DrawBar(sc_x+2, sc_y+1, 14, sc_slider_y-sc_y-1, 0xCED0D0);
31
		DrawBar(sc_x+2, sc_y+1, 14, sc_slider_y-sc_y-1, col.slider_bg_big);
34
	}
32
	}
35
	//area after slider
33
	//area after slider
36
	if (sc_h-sc_slider_h+sc_y-2>sc_slider_y)
34
	if (sc_h-sc_slider_h+sc_y-2>sc_slider_y)
37
	{
35
	{
38
		DrawBar(sc_x+1, sc_slider_y + sc_slider_h+1, 15, 1, 0xC7C9C9);
36
		DrawBar(sc_x+1, sc_slider_y + sc_slider_h+1, 15, 1, col.slider_bg_left);
39
		DrawBar(sc_x+1, sc_slider_y + sc_slider_h+2,  1, sc_h-sc_slider_h-sc_slider_y+sc_y-2, 0xC7C9C9);
37
		DrawBar(sc_x+1, sc_slider_y + sc_slider_h+2,  1, sc_h-sc_slider_h-sc_slider_y+sc_y-2, col.slider_bg_left);
40
		DrawBar(sc_x+2, sc_slider_y + sc_slider_h+2, 14, sc_h-sc_slider_h-sc_slider_y+sc_y-2, 0xCED0D0);
38
		DrawBar(sc_x+2, sc_slider_y + sc_slider_h+2, 14, sc_h-sc_slider_h-sc_slider_y+sc_y-2, col.slider_bg_big);
41
	}
39
	}
42
}
40
}
43
 
41
 
Line 44... Line 42...
44
void DrawFlatButtonSmall(dword x,y,width,height,id,text)
42
void DrawFlatButtonSmall(dword x,y,width,height,id,text)
45
{
43
{
46
	DrawRectangle(x,y,width,height,col_graph);
44
	DrawRectangle(x,y,width,height,col.graph);
47
	DrawRectangle3D(x+1,y+1,width-2,height-2, system.color.work_light , system.color.work_dark);
45
	DrawRectangle3D(x+1,y+1,width-2,height-2, system.color.work_light, system.color.work_dark);
48
	PutPixel(x+width-1, y+1, system.color.work_dark);
46
	PutPixel(x+width-1, y+1, system.color.work_dark);
49
	DrawFilledBar(x+2, y+2, width-3, height-3);
47
	DrawFilledBar(x+2, y+2, width-3, height-3);
50
	if (id) DefineHiddenButton(x+1,y+1,width-2,height-2,id);
48
	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,system.color.work_text,text);
49
	WriteText(-strlen(text)*6+width/2+x+1,height/2+y-3,0x80,system.color.work_text,text);
52
}
50
}
Line 53... Line 51...
53
 
51
 
54
void DrawFilledBar(dword x, y, w, h)
52
void DrawFilledBar(dword x, y, w, h)
55
{
53
{
56
	int i, fill_h;
54
	int i, fill_h;
57
	if (h <= 14) fill_h = h; else fill_h = 14;
55
	if (h < 12) {
-
 
56
		for (i=0; i
58
	for (i=0; i
57
	} else {
-
 
58
		DrawBar(x, y, w, h, col.work_gradient[12]);
59
	DrawBar(x, y+i, w, h-fill_h, col_work_gradient[14-i]);
59
	}
Line 60... Line 60...
60
}
60
}
61
 
61
 
62
int popin_w=260;
62
int popin_w=260;
63
void DrawEolitePopup(dword b1_text, b2_text)
63
void DrawEolitePopup(dword b1_text, b2_text)
64
{
64
{
65
	int but_x;
65
	int but_x;
66
	int popin_x = files.w - popin_w / 2 + files.x ;
66
	int popin_x = files.w - popin_w / 2 + files.x ;
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);
Line 69... Line 69...
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
void DrawDot(dword x,y) {
72
void DrawDot(dword x,y) {
73
	dword col_pxl = MixColors(col_graph, col_work, 60);
73
	dword col_pxl = MixColors(col.graph, col.work, 60);
74
	DrawBar(x+1,y,2,4,col_graph);
74
	DrawBar(x+1,y,2,4,col.graph);
75
	DrawBar(x,y+1,4,2,col_graph);
75
	DrawBar(x,y+1,4,2,col.graph);
76
	PutPixel(x,y,col_pxl);
76
	PutPixel(x,y,col_pxl);
77
	PutPixel(x+3,y,col_pxl);
77
	PutPixel(x+3,y,col_pxl);