Rev 7286 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7286 | Rev 7852 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | struct _canvas |
1 | struct _canvas |
2 | { |
2 | { |
3 | void write_text(); |
3 | dword write_text(); |
4 | void draw_hor_line(); |
4 | void draw_hor_line(); |
5 | }; |
5 | }; |
Line 6... | Line 6... | ||
6 | 6 | ||
7 | void _canvas::write_text(int _x, _y; dword _text_col, _text_off) |
7 | dword _canvas::write_text(int _x, _y; dword _text_col, _text_off) |
8 | { |
8 | { |
- | 9 | char error_message[128]; |
|
Line 9... | Line 10... | ||
9 | char error_message[128]; |
10 | dword new_x; |
10 | 11 | ||
11 | if (_x > list.w) { |
12 | if (_x > list.w) { |
12 | sprintf(#error_message, "ERROR: canvas.x overflow: H %d X %d", kfont.size.height, _x); |
13 | sprintf(#error_message, "ERROR: canvas.x overflow: H %d X %d", kfont.size.height, _x); |
13 | debugln(#error_message); |
14 | debugln(#error_message); |
14 | } |
15 | } |
15 | if (_y+kfont.size.pt > kfont.size.height) { |
16 | if (_y+kfont.size.pt > kfont.size.height) { |
16 | sprintf(#error_message, "ERROR: canvas.y overflow: H %d Y %d", kfont.size.height, _y); |
17 | sprintf(#error_message, "ERROR: canvas.y overflow: H %d Y %d", kfont.size.height, _y); |
17 | debugln(#error_message); |
18 | debugln(#error_message); |
18 | return; |
19 | return; |
19 | } |
20 | } |
- | 21 | new_x = kfont.WriteIntoBuffer(_x, _y, list.w, kfont.size.height, 0xFFFFFF, _text_col, kfont.size.pt, _text_off); |
|
20 | kfont.WriteIntoBuffer(_x, _y, list.w, kfont.size.height, 0xFFFFFF, _text_col, kfont.size.pt, _text_off); |
22 | if (_y/list.item_h-list.first==list.visible) DrawPage(); |
Line 21... | Line 23... | ||
21 | if (_y/list.item_h-list.first==list.visible) DrawPage(); |
23 | return new_x; |
22 | } |
24 | } |