Subversion Repositories Kolibri OS

Rev

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

Rev 7226 Rev 7614
Line 2... Line 2...
2
#define TAB_HEIGHT 28
2
#define TAB_HEIGHT 28
3
 
3
 
Line 4... Line 4...
4
:struct _tabs
4
:struct _tabs
5
{
5
{
6
	int x,y,w,h;
-
 
7
	int active_tab;
6
	int active_tab;
8
	int c;
7
	int x,y,w,h;
9
	void draw_button();
8
	void draw_button();
10
	int click();
9
	int click();
11
	void draw_wrapper();
10
	void draw_wrapper();
12
};
11
};
Line 13... Line 12...
13
 
12
 
14
:void _tabs::draw_wrapper()
13
:void _tabs::draw_wrapper()
15
{
-
 
16
	dword color_light = MixColors(system.color.work, 0xFFFfff, 40);
-
 
17
	dword color_content = MixColors(system.color.work, 0xFFFfff, 120);
-
 
18
	dword color_light_border = MixColors(system.color.work, system.color.work_graph, 120);
-
 
19
 
14
{
20
	DrawRectangle(x-1, y-1, w+1, h+1, system.color.work_graph);
-
 
21
	DrawBar(x, y, w, h, color_content); //0xF3F3F3
-
 
22
	DrawRectangle3D(x, y, w-1, h-1, color_light, color_content); //0xF3F3F3
-
 
23
 
-
 
24
	DrawBar(x+1, y+h+1, w-2, 2, system.color.work_dark); //"shadow"
-
 
25
 
-
 
26
	DrawBar(x, y+TAB_HEIGHT-1, w, 1, color_light_border);
15
	DrawRectangle(x,y+TAB_HEIGHT,w-1,h-TAB_HEIGHT, system.color.work_graph);
27
	DrawBar(x, y+TAB_HEIGHT, w, 1, color_light);
-
 
28
 
-
 
29
	c = y + TAB_HEIGHT;
16
	DrawRectangle(x+1,y+1+TAB_HEIGHT,w-3,h-2-TAB_HEIGHT, system.color.work_light);
Line 30... Line 17...
30
}
17
}
31
 
18
 
32
:void _tabs::draw_button(dword xx, but_id, text)
19
:void _tabs::draw_button(dword xx, but_id, text)
33
{
20
{
Line 34... Line 21...
34
	dword col_bg, col_text;
21
	dword col_bg, col_text;
35
	dword ww=strlen(text)*8, hh=TAB_HEIGHT;
22
	dword ww=strlen(text)*8, hh=TAB_HEIGHT;
36
 
23
 
37
	if (but_id==active_tab)
24
	if (but_id==active_tab)
38
	{
25
	{
39
		col_bg=0xE44C9C;
26
		col_bg=0xE44C9C;
40
		col_text=0x000000;
27
		col_text=system.color.work_text;
41
	}
28
	}
42
	else
29
	else
43
	{
30
	{
44
		col_bg=0xC3A1B7;
31
		col_bg=0xC3A1B7;
45
		col_text=0x333333;
32
		col_text= MixColors(system.color.work, system.color.work_text, 120);
46
	} 
33
	} 
-
 
34
	DefineHiddenButton(xx-2,y, ww-1+4,hh-1, but_id);
47
	DefineHiddenButton(xx,y, ww-1,hh-1, but_id);
35
	WriteText(xx, y+6, 0x90, col_text, text);
Line 48... Line 36...
48
	WriteText(xx, y+6, 0x90, col_text, text);
36
	DrawBar(xx, y+hh-3, ww, 3, col_bg);
49
	DrawBar(xx, y+hh-3, ww, 3, col_bg);
37
	//DrawStandartCaptButton(xx, y, but_id, text); //GetFreeButtonId()
50
}
38
}