Subversion Repositories Kolibri OS

Rev

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

Rev 7910 Rev 7998
Line 204... Line 204...
204
	if (font_type==0x80) w = strlen(inscription)*6; else w = strlen(inscription)*8;
204
	if (font_type==0x80) w = strlen(inscription)*6; else w = strlen(inscription)*8;
205
	DefineButton(x-1,y-1,w,10,btn_id+BT_HIDE,0);
205
	DefineButton(x-1,y-1,w,10,btn_id+BT_HIDE,0);
206
	DrawBar(x,y+8,w,1,0x4E00E7);
206
	DrawBar(x,y+8,w,1,0x4E00E7);
207
}
207
}
Line 208... Line 208...
208
 
208
 
209
:void PutShadow(dword x,y,w,h,skinned,strength)
209
:void PutShadow(dword x,y,w,h,skinned, signed strength)
210
{
210
{
211
	proc_info wForm;
211
	proc_info wForm;
212
	dword shadow_buf = mem_Alloc(w*h*3);
212
	dword shadow_buf = mem_Alloc(w*h*3);
213
 	GetProcessInfo(#wForm, SelfInfo);
213
 	GetProcessInfo(#wForm, SelfInfo);
Line 258... Line 258...
258
		DSBYTE[i] = DSBYTE[i+1] = DSBYTE[i+2] = gray;
258
		DSBYTE[i] = DSBYTE[i+1] = DSBYTE[i+2] = gray;
259
	}
259
	}
260
	return gray;
260
	return gray;
261
}
261
}
Line 262... Line 262...
262
 
262
 
263
:void ShadowImage(dword color_image, w, h, strength)
263
:void ShadowImage(dword color_image, w, h, signed strength)
-
 
264
{
264
{
265
	byte col;
265
	dword col, to;
266
	dword to;
266
	strength = 10 - strength;
267
	strength = 10 - strength;
267
	to = w*h*3 + color_image;
268
	to = w*h*3 + color_image;
268
	for ( ; color_image < to; color_image++)
269
	for ( ; color_image < to; color_image++)
269
	{
270
	{
270
		col = strength * DSBYTE[color_image] / 10;
271
		col = math.min(strength * DSBYTE[color_image] / 10, 255);
271
		DSBYTE[color_image] = col;
272
		DSBYTE[color_image] = col;
272
	}
273
	}
Line 273... Line 274...
273
}
274
}