Rev 5779 | Rev 5784 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5779 | Rev 5781 | ||
---|---|---|---|
Line 9... | Line 9... | ||
9 | 9 | ||
10 | struct llist |
10 | struct llist |
11 | { |
11 | { |
12 | int x, y, w, h, line_h, text_y; |
12 | int x, y, w, h, line_h, text_y; |
13 | int count, visible, first, current, column_max; //visible = row_max |
13 | int count, visible, first, current, column_max; //visible = row_max |
14 | dword font_w, font_h, font_type; |
14 | byte font_w, font_h, font_type; |
15 | byte wheel_size; |
15 | byte wheel_size; |
16 | byte active; |
16 | byte active; |
17 | byte no_selection; |
17 | byte no_selection; |
18 | void ClearList(); |
18 | void ClearList(); |
Line 124... | Line 124... | ||
124 | return 0; |
124 | return 0; |
125 | } |
125 | } |
Line 126... | Line 126... | ||
126 | 126 | ||
127 | int llist::KeyDown() |
127 | int llist::KeyDown() |
- | 128 | { |
|
- | 129 | if (no_selection) |
|
- | 130 | { |
|
- | 131 | if (visible + first >= count) return 0; |
|
- | 132 | first++; |
|
- | 133 | return 1; |
|
- | 134 | } |
|
128 | { |
135 | |
129 | if (current-first+1 |
136 | if (current-first+1 |
130 | { |
137 | { |
131 | if (current + 1 >= count) return 0; |
138 | if (current + 1 >= count) return 0; |
132 | current++; |
139 | current++; |
133 | } |
140 | } |
Line 145... | Line 152... | ||
145 | return 1; |
152 | return 1; |
146 | } |
153 | } |
Line 147... | Line 154... | ||
147 | 154 | ||
148 | int llist::KeyUp() |
155 | int llist::KeyUp() |
- | 156 | { |
|
- | 157 | if (no_selection) |
|
- | 158 | { |
|
- | 159 | if (first == 0) return 0; |
|
- | 160 | first--; |
|
- | 161 | return 1; |
|
- | 162 | } |
|
149 | { |
163 | |
150 | if (current > first) && (!no_selection) |
164 | if (current > first) |
151 | { |
165 | { |
152 | current--; |
166 | current--; |
153 | } |
167 | } |
154 | else |
168 | else |