Subversion Repositories Kolibri OS

Rev

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

Rev 7089 Rev 7160
Line 348... Line 348...
348
}
348
}
Line 349... Line 349...
349
 
349
 
350
 
350
 
351
//this function increase falue and return it
351
//this function increase falue and return it
352
//useful for list of controls which goes one after one
352
//useful for list of controls which goes one after one
353
struct incn
353
:struct incn
354
{
354
{
355
	dword n;
355
	dword n;
Line 356... Line 356...
356
	dword inc(dword _addition);
356
	dword inc(dword _addition);
357
};
357
};
358
 
358
 
359
dword incn::inc(dword _addition)
359
:dword incn::inc(dword _addition)
360
{
360
{
Line 409... Line 409...
409
==
409
==
410
==                   MORE LESS BOX
410
==                   MORE LESS BOX
411
==
411
==
412
/========================================================*/
412
/========================================================*/
Line 413... Line 413...
413
 
413
 
414
struct more_less_box
414
:struct more_less_box
415
{
415
{
416
	signed x,y;
416
	signed x,y;
417
	unsigned value, min, max;
417
	unsigned value, min, max;
418
	unsigned bt_id_more, bt_id_less;
418
	unsigned bt_id_more, bt_id_less;
419
	dword text;
419
	dword text;
420
	bool click();
420
	bool click();
421
	void draw();
421
	void draw();
Line 422... Line 422...
422
};
422
};
423
 
423
 
424
bool more_less_box::click(unsigned id)
424
:bool more_less_box::click(unsigned id)
425
{
425
{
426
	if (id==bt_id_less) { value = math.max(value-1, min); draw(); return 1; }
426
	if (id==bt_id_less) { value = math.max(value-1, min); draw(); return 1; }
427
	if (id==bt_id_more) { value = math.min(value+1, max); draw(); return 1; }
427
	if (id==bt_id_more) { value = math.min(value+1, max); draw(); return 1; }
Line 428... Line 428...
428
	return 0;
428
	return 0;
429
}
429
}
430
 
430
 
431
void more_less_box::draw()
431
:void more_less_box::draw()
432
{
432
{