Subversion Repositories Kolibri OS

Rev

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

Rev 7636 Rev 7783
Line 21... Line 21...
21
	if (!click_delta) click_delta = 1;
21
	if (!click_delta) click_delta = 1;
22
}
22
}
Line 23... Line 23...
23
 
23
 
24
:bool more_less_box::click(unsigned id)
24
:bool more_less_box::click(unsigned id)
-
 
25
{
25
{
26
	if (disabled) return 0;
26
	if (id==id_dec) { value = math.max(value-click_delta, min); redraw(); return 1; }
27
	if (id==id_dec) { value = math.max(value-click_delta, min); redraw(); return 1; }
27
	if (id==id_inc) { value = math.min(value+click_delta, max); redraw(); return 1; }
28
	if (id==id_inc) { value = math.min(value+click_delta, max); redraw(); return 1; }
28
	return 0;
29
	return 0;
Line 40... Line 41...
40
 
41
 
41
:void more_less_box::draw(dword _x,_y)
42
:void more_less_box::draw(dword _x,_y)
42
{
43
{
43
	#define VALUE_FIELD_W 34
44
	#define VALUE_FIELD_W 34
44
	#define SIZE 18
45
	#define SIZE 18
45
	dword text_col = system.color.work_text;
46
	dword text_col;
Line 46... Line 47...
46
	dword value_text = itoa(value);
47
	dword value_text = itoa(value);
47
 
48
 
Line 53... Line 54...
53
 
54
 
54
	if (disabled)
55
	if (disabled)
55
	{
56
	{
56
		DrawRectangle(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xffffff);
57
		DrawRectangle(x+1, y+1, VALUE_FIELD_W-2, SIZE-2, 0xffffff);
57
		DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xCCCccc);
58
		DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xCCCccc);
58
		text_col = MixColors(system.color.work, system.color.work_text, 128);
59
		text_col = system.color.work_graph;
59
	}
60
	}
60
	else 
61
	else 
61
	{
62
	{
-
 
63
		DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xffffff);
62
		DrawBar(x+2, y+2, VALUE_FIELD_W-3, SIZE-3, 0xffffff);
64
		text_col = system.color.work_text;
Line 63... Line 65...
63
	}
65
	}
Line 64... Line 66...
64
 
66