Subversion Repositories Kolibri OS

Rev

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

Rev 7806 Rev 7906
Line 22... Line 22...
22
 
22
 
Line 23... Line 23...
23
:void sensor::draw_wrapper()
23
:void sensor::draw_wrapper()
24
{
24
{
25
	DrawRectangle(x-1, y-1, w+1, h+1, sc.work_graph);
25
	DrawRectangle(x-1, y-1, w+1, h+1, sc.work_graph);
26
	DrawRectangle3D(x-2, y-2, w+3, h+3, sc.work_dark, sc.work_light);
26
	DrawRectangle3D(x-2, y-2, w+3, h+3, sc.work, sc.work_light);
27
}
27
}
Line 28... Line 28...
28
 
28
 
29
:void sensor::draw_progress(dword progress_w, active_value, bg_value, mesure)
29
:void sensor::draw_progress(dword progress_w)
30
{
30
{
31
	if (progress_w < MIN_PB_BLOCK_W) progress_w = MIN_PB_BLOCK_W;
-
 
32
	if (progress_w > w-MIN_PB_BLOCK_W) progress_w = w-MIN_PB_BLOCK_W;
-
 
33
 
31
	char textp[16];
34
	DrawBar(x, y,     w-progress_w, 1,   MixColors(PROGRESS_ACTIVE, PROGRESS_BG, 200));
32
	DrawBar(x, y,     w-progress_w, 1,   MixColors(PROGRESS_ACTIVE, PROGRESS_BG, 200));
35
	DrawBar(x, y+1,   w-progress_w, h-2, PROGRESS_ACTIVE);
33
	DrawBar(x, y+1,   w-progress_w, h-2, PROGRESS_ACTIVE);
36
	DrawBar(x, y+h-1, w-progress_w, 1,   MixColors(PROGRESS_ACTIVE, sc.work_graph, 200));
-
 
37
 
-
 
38
	sprintf(#param, "%i%s", active_value, mesure);
-
 
39
	WriteText(w-progress_w- calc(strlen(#param)*8) /2 + x, h/2-7+y, 0x90, PROGRESS_BG, #param);
-
 
40
 
34
	DrawBar(x, y+h-1, w-progress_w, 1,   MixColors(PROGRESS_ACTIVE, sc.work_graph, 200));
-
 
35
	DrawBar(x+w-progress_w, y, progress_w, h, PROGRESS_BG);
41
	DrawBar(x+w-progress_w, y, progress_w, h, PROGRESS_BG);
36
 
-
 
37
	strcpy(#textp, itoa(w-progress_w*100/w));
42
	sprintf(#param, "%i%s", bg_value, mesure);
38
	chrcat(#textp, '%');
43
	WriteText(-progress_w - calc(strlen(#param)*8)/2 + w+x, h/2-7+y, 0x90, PROGRESS_BG_TEXT, #param);
39
	WriteText(-strlen(#textp)*8 + w / 2 + x, h/2-7+y, 0x90, 0x000000, #textp);
44
}
40
}