Subversion Repositories Kolibri OS

Rev

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

Rev 7806 Rev 7866
Line 1... Line 1...
1
void DrawTopPanelButton(dword _button_id, _x, _y, signed int _icon_n)
1
unsigned int DrawTopPanelButton(dword _button_id, _x, _y, signed int _icon_n)
2
{
2
{
3
	#define TSZE 25
3
	#define TSZE 25
4
	static libimg_image top_icons;
4
	static libimg_image top_icons;
5
	static dword semi_white=0, bg_col_light, bg_col_dark;
5
	static dword semi_white=0, bg_col_light, bg_col_dark;
-
 
6
	int i;
6
	if (!semi_white) {
7
	if (!semi_white) {
7
		Libimg_LoadImage(#top_icons, "/sys/icons16.png");
8
		Libimg_LoadImage(#top_icons, "/sys/icons16.png");
Line 8... Line 9...
8
 
9
 
9
		semi_white = MixColors(sc.work, 0xFFFfff, skin_is_dark()*90 + 96);
10
		semi_white = MixColors(sc.work, 0xFFFfff, skin_is_dark()*90 + 96);
Line 19... Line 20...
19
 
20
 
Line 20... Line 21...
20
	DefineHiddenButton(_x, _y, TSZE+1, TSZE+1, _button_id);
21
	DefineHiddenButton(_x, _y, TSZE+1, TSZE+1, _button_id);
21
	if (_icon_n==-1) {
22
	if (_icon_n==-1) {
22
		DrawBar(_x+6, _y+5, 16, 16, semi_white);
23
		DrawBar(_x+6, _y+5, 16, 16, semi_white);
-
 
24
		for (i=0; i<=2; i++) DrawBar(_x+6, i*5+_y+7, 15, 3, sc.work_graph);
23
	} else {
25
	} else {
24
		img_draw stdcall(top_icons.image, _x+6, _y+5, 16, 16, 0, _icon_n*16);
26
		img_draw stdcall(top_icons.image, _x+6, _y+5, 16, 16, 0, _icon_n*16);
25
	}
27
	}
-
 
28
	return _x;
26
}
29
}
27
30