Rev 4049 | Rev 4063 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4049 | Rev 4059 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | { |
4 | { |
5 | int x, y, w, h, min_h, line_h; |
5 | int x, y, w, h, min_h, line_h; |
6 | int count, visible, first, current; |
6 | int count, visible, first, current; |
7 | int current_temp; |
7 | int current_temp; |
8 | void ClearList(); |
8 | void ClearList(); |
- | 9 | int KeyDown(); |
|
- | 10 | int KeyUp(); |
|
9 | void SetSizes(int xx, yy, ww, hh, min_hh, line_hh); |
11 | void SetSizes(int xx, yy, ww, hh, min_hh, line_hh); |
10 | int MouseScroll(dword scroll_state); |
12 | int MouseScroll(dword scroll_state); |
11 | }; |
13 | }; |
Line 42... | Line 44... | ||
42 | if (visible+first+3 >= count) first = count - visible; else first+=2; |
44 | if (visible+first+3 >= count) first = count - visible; else first+=2; |
43 | return 1; |
45 | return 1; |
44 | } |
46 | } |
45 | return 0; |
47 | return 0; |
46 | } |
48 | } |
47 | 49 | ||
- | 50 | int llist::KeyDown() |
|
- | 51 | { |
|
- | 52 | if (current-first+1 |
|
- | 53 | { |
|
- | 54 | if (current+1>=count) return -1; |
|
- | 55 | current++; |
|
- | 56 | } |
|
- | 57 | else |
|
- | 58 | { |
|
- | 59 | if (visible+first>=count) return -1; |
|
- | 60 | first++; |
|
- | 61 | current++; |
|
- | 62 | } |
|
- | 63 | return 1; |
|
- | 64 | } |
|
- | 65 | ||
- | 66 | int llist::KeyUp() |
|
- | 67 | { |
|
- | 68 | if (current>first) |
|
- | 69 | { |
|
- | 70 | current--; |
|
- | 71 | } |
|
- | 72 | else |
|
- | 73 | { |
|
- | 74 | if (first==0) return -1; |
|
- | 75 | first--; |
|
- | 76 | current--; |
|
- | 77 | } |
|
- | 78 | return 1; |
|
- | 79 | } |
|
- | 80 | > |
|
48 | 81 |