Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
7491 leency 1
 
2
#define LOAD_CPU 0x2460C8
3
#define PROGRESS_ACTIVE 0x489FE4
4
#define PROGRESS_BG 0xFFFfff
5
#define PROGRESS_BG_TEXT 0x696969
6
7
 
8
	int x,y,w,h;
9
	void set_size();
10
	void draw_wrapper();
11
	void draw_progress();
12
};
13
14
 
15
{
16
	x=_x+2;
17
	y=_y;
18
	w=_w;
19
	h=_h;
20
	draw_wrapper();
21
}
22
23
 
24
{
25
	DrawRectangle(x-1, y-1, w+1, h+1, sc.work_graph);
7806 leency 26
	DrawRectangle3D(x-2, y-2, w+3, h+3, sc.work_dark, sc.work_light);
27
}
7491 leency 28
29
 
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
34
 
35
	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));
7806 leency 37
7491 leency 38
 
39
	WriteText(w-progress_w- calc(strlen(#param)*8) /2 + x, h/2-7+y, 0x90, PROGRESS_BG, #param);
40
41
 
42
	sprintf(#param, "%i%s", bg_value, mesure);
43
	WriteText(-progress_w - calc(strlen(#param)*8)/2 + w+x, h/2-7+y, 0x90, PROGRESS_BG_TEXT, #param);
44
}
45