Subversion Repositories Kolibri OS

Rev

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

Rev 5477 Rev 5499
Line 61... Line 61...
61
		DrawRectangle(x+1, y+1, w-2, h-2, 0xffffff);
61
		DrawRectangle(x+1, y+1, w-2, h-2, 0xffffff);
62
		DrawBar(x+2, y+2, w-3, h-3, 0x888888);	
62
		DrawBar(x+2, y+2, w-3, h-3, 0x888888);	
63
	}
63
	}
64
}
64
}
Line 65... Line -...
65
 
-
 
66
 
65
 
67
:void MoreLessBox(dword x,y,s, bt_id_more, bt_id_less, color_border, color_button, color_text, value, text)
66
:void MoreLessBox(dword x,y,s, bt_id_more, bt_id_less, color_border, color_button, color_text, value, text)
68
{
67
{
69
	#define VALUE_FIELD_W 26;
68
	#define VALUE_FIELD_W 26;
70
	DrawRectangle(x, y, VALUE_FIELD_W, s, color_border);
69
	DrawRectangle(x, y, VALUE_FIELD_W, s, color_border);
Line 75... Line 74...
75
	DrawCaptButton(VALUE_FIELD_W + x + 1,     y, s, s, bt_id_more, color_button, color_text, "+");
74
	DrawCaptButton(VALUE_FIELD_W + x + 1,     y, s, s, bt_id_more, color_button, color_text, "+");
76
	DrawCaptButton(VALUE_FIELD_W + x + s + 2, y, s, s, bt_id_less, color_button, color_text, "-");
75
	DrawCaptButton(VALUE_FIELD_W + x + s + 2, y, s, s, bt_id_less, color_button, color_text, "-");
77
	WriteText(x+VALUE_FIELD_W+s+s+10, s / 2 + y -3, 0x80, color_text, text);
76
	WriteText(x+VALUE_FIELD_W+s+s+10, s / 2 + y -3, 0x80, color_text, text);
78
}
77
}
Line 79... Line -...
79
 
-
 
80
 
78
 
81
:void DrawProgressBar(dword st_x, st_y, st_w, st_h, col_fon, col_border, col_fill, col_text, progress_percent)
79
:void DrawProgressBar(dword st_x, st_y, st_w, st_h, col_fon, col_border, col_fill, col_text, progress_percent)
82
{
80
{
83
	int progress_w;
81
	int progress_w;
Line 104... Line 102...
104
	if (font_type==0x80) w = strlen(inscription)*6; else w = strlen(inscription)*7;
102
	if (font_type==0x80) w = strlen(inscription)*6; else w = strlen(inscription)*7;
105
	DefineButton(x-1,y-1,w,10,btn_id+BT_HIDE,0);
103
	DefineButton(x-1,y-1,w,10,btn_id+BT_HIDE,0);
106
	DrawBar(x,y+8,w,1,0x4E00E7);
104
	DrawBar(x,y+8,w,1,0x4E00E7);
107
}
105
}
Line 108... Line -...
108
 
-
 
109
 
106
 
110
:void PutShadow(dword x,y,w,h,skinned,strength)
107
:void PutShadow(dword x,y,w,h,skinned,strength)
111
{
108
{
112
	proc_info wForm;
109
	proc_info wForm;
113
	dword shadow_buf, skin_height;
110
	dword shadow_buf, skin_height;
Line 117... Line 114...
117
	ShadowImage(shadow_buf, w, h, strength);
114
	ShadowImage(shadow_buf, w, h, strength);
118
	_PutImage(x,y,w,h,shadow_buf);
115
	_PutImage(x,y,w,h,shadow_buf);
119
	mem_Free(shadow_buf);
116
	mem_Free(shadow_buf);
120
}
117
}
Line 121... Line -...
121
 
-
 
122
:void DrawPopupShadow(dword x,y,w,h,skinned)
-
 
123
{
-
 
124
	PutShadow(w+x+1,y,1,h+2,skinned,2);
-
 
125
	PutShadow(w+x+2,y+1,1,h+2,skinned,1);
-
 
126
	PutShadow(x,y+h+2,w+2,1,skinned,2);
-
 
127
	PutShadow(x+1,y+h+3,w+1,1,skinned,1);
-
 
128
}
-
 
129
 
118
 
130
:void DrawPopup(dword x,y,w,h,skinned, col_work,col_border)
119
:void DrawPopup(dword x,y,w,h,skinned, col_work,col_border)
131
{
120
{
132
	DrawRectangle(x,y,w,h,col_border);
121
	DrawRectangle(x,y,w,h,col_border);
133
	DrawBar(x+1,y+1,w-1,1,0xFFFfff);
122
	DrawBar(x+1,y+1,w-1,1,0xFFFfff);
134
	DrawBar(x+1,y+2,1,h-2,0xFFFfff);
123
	DrawBar(x+1,y+2,1,h-2,0xFFFfff);
135
	if (col_work!=-1) DrawBar(x+2,y+2,w-2,h-2,col_work);
124
	if (col_work!=-1) DrawBar(x+2,y+2,w-2,h-2,col_work);
136
	DrawPopupShadow(x,y,w,h-1,skinned);
125
	DrawPopupShadow(x,y,w,h-1,skinned);
Line -... Line 126...
-
 
126
}
-
 
127
 
-
 
128
:void DrawPopupShadow(dword x,y,w,h,skinned)
-
 
129
{
-
 
130
	PutShadow(w+x+1,y,1,h+2,skinned,2);
-
 
131
	PutShadow(w+x+2,y+1,1,h+2,skinned,1);
-
 
132
	PutShadow(x,y+h+2,w+2,1,skinned,2);
-
 
133
	PutShadow(x+1,y+h+3,w+1,1,skinned,1);
137
}
134
}
138
 
135
 
139
:void GrayScaleImage(dword color_image, w, h)
136
:void GrayScaleImage(dword color_image, w, h)
140
{
137
{
141
	dword i,gray,rr,gg,bb;
138
	dword i,gray,rr,gg,bb;