Subversion Repositories Kolibri OS

Rev

Rev 7941 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7941 Rev 8439
Line 23... Line 23...
23
	}
23
	}
24
}
24
}
Line 25... Line 25...
25
 
25
 
26
void SELECTION::draw_line(dword x,y,w)
26
void SELECTION::draw_line(dword x,y,w)
27
{
27
{
28
	DrawBuf.DrawBar(x, y - list.first * list.item_h, w, list.item_h, color);
28
	canvas.DrawBar(x, y - list.first * list.item_h, w, list.item_h, color);
Line 29... Line 29...
29
}
29
}
30
 
30
 
31
void SELECTION::draw(int i)
31
void SELECTION::draw(int i)
32
{
32
{
33
	if (is_active()) {
33
	if (is_active()) {
34
		if (start_y == i) && (end_y == i) draw_line(start_x * list.font_w+2, start_y, end_x - start_x * list.font_w);
34
		if (start_y == i) && (end_y == i) draw_line(start_x * list.font_w+2, start_y, end_x - start_x * list.font_w);
35
		else if (start_y == i) draw_line(start_x * list.font_w+2, start_y, list.w -2- calc(start_x * list.font_w));
35
		else if (start_y == i) draw_line(start_x * list.font_w+2, start_y, list.w -2- calc(start_x * list.font_w));
36
		else if (end_y == i) draw_line(0, end_y, end_x * list.font_w+2);
36
		else if (end_y == i) draw_line(0, end_y, end_x * list.font_w+2);
37
		//only for debug:
37
		//only for debug:
38
		//DrawBuf.DrawBar(start_x * list.font_w + 2,  start_y * list.item_h, 2, list.item_h, 0x00FF00);
38
		//canvas.DrawBar(start_x * list.font_w + 2,  start_y * list.item_h, 2, list.item_h, 0x00FF00);
39
		//DrawBuf.DrawBar(end_x * list.font_w + 0,  end_y * list.item_h, 2, list.item_h, 0xFF00FF);
39
		//canvas.DrawBar(end_x * list.font_w + 0,  end_y * list.item_h, 2, list.item_h, 0xFF00FF);
40
	}
40
	}
41
	//DrawCursor
41
	//DrawCursor
42
	if (list.cur_y >= list.first) && (list.cur_y <= list.first+list.visible) {
42
	if (list.cur_y >= list.first) && (list.cur_y <= list.first+list.visible) {
43
		DrawBuf.DrawBar(list.cur_x * list.font_w + 2,  list.cur_y - list.first * list.item_h, 2, list.item_h, theme.cursor);
43
		canvas.DrawBar(list.cur_x * list.font_w + 2,  list.cur_y - list.first * list.item_h, 2, list.item_h, theme.cursor);
Line 44... Line 44...
44
	}
44
	}
45
}
45
}