Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
5612 punk_joker 1
#define COL_PADDING 0xC8C9C9
2
 
3
dword col_palette[14] = {0xD2D3D3,0xD4D4D4,0xD6D5D6,0xD8D7D8,0xDAD8D9,0xDCDADB,
4
0xDFDCDD,0xE1DDDE,0xE2DEE0,0xE4DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1,0xE3DFE1};
5
 
6
void DrawFlatButton(dword x,y,width,height,id,color,text)
7
{
8
	int fill_h;
5674 pavelyakov 9
	DrawRectangle(x,y,width,height,system.color.work_graph);
5612 punk_joker 10
	DrawRectangle3D(x+1,y+1,width-2,height-2,0xFEFEFE,COL_PADDING);
11
	PutPixel(x+width-1, y+1, COL_PADDING);
12
	if (color!=-1) DrawFilledBar(x+2, y+2, width-3, height-3);
13
	IF (id<>0)	DefineButton(x+1,y+1,width-2,height-2,id+BT_HIDE,0xEFEBEF);
5674 pavelyakov 14
	WriteText(-strlen(text)*6+width/2+x+1,height/2-3+y,0x80,system.color.work_text,text);
5612 punk_joker 15
}
16
 
17
void DrawFilledBar(dword x, y, w, h)
18
{
19
	int i, fill_h;
20
	if (h <= 14) fill_h = h; else fill_h = 14;
21
	for (i=0; i
22
	DrawBar(x, y+i, w, h-fill_h, col_palette[14-i]);
23
}