Rev 4817 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4817 | Rev 7957 | ||
---|---|---|---|
Line 4... | Line 4... | ||
4 | dd 0x01,start,i_end,e_end,e_end,0,0 |
4 | dd 0x01,start,i_end,e_end,e_end,0,0 |
Line 5... | Line 5... | ||
5 | 5 | ||
6 | include '../../../proc32.inc' |
6 | include '../../../proc32.inc' |
Line 7... | Line 7... | ||
7 | include '../../../macros.inc' |
7 | include '../../../macros.inc' |
8 | 8 | ||
9 | BUTTON_SIDE equ 16 ; button are squares |
9 | BUTTON_SIDE = 28 ; button are squares |
10 | BUTTON_SPACE equ 19 ; space between cols and rows |
10 | BUTTON_SPACE = 34 ; space between cols and rows |
11 | BUTTON_ID_SHIFT equ 2 ; button_id = character + BUTTON_ID_SHIFT |
11 | BUTTON_ID_SHIFT = 2 ; button_id = character + BUTTON_ID_SHIFT |
- | 12 | TABLE_BEGIN_X = 2 |
|
Line 12... | Line 13... | ||
12 | TABLE_BEGIN_X equ 2 |
13 | TABLE_BEGIN_Y = 2 |
13 | TABLE_BEGIN_Y equ 2 |
14 | PANEL_Y = BUTTON_SPACE*8+TABLE_BEGIN_Y+TABLE_BEGIN_Y |
Line 14... | Line 15... | ||
14 | 15 | ||
15 | FOCUS_SQUARE_COLOR equ 0x000080FF |
16 | FOCUS_SQUARE_COLOR = 0x000080FF |
16 | PAGE_SWITCHER_BLINK_COLOR equ 0x00808080 |
17 | SWITCHER_BLINK_COLOR = 0x00808080 |
Line 60... | Line 61... | ||
60 | stdcall draw_page_switcher, 0 ; 0 means usual light color |
61 | stdcall draw_page_switcher, 0 ; 0 means usual light color |
61 | jmp still |
62 | jmp still |
Line 62... | Line 63... | ||
62 | 63 | ||
63 | redraw: |
64 | redraw: |
64 | mcall 9, proc_info, -1 |
- | |
Line 65... | Line 65... | ||
65 | mcall 48, 3, sys_colors, 40 |
65 | mcall 9, proc_info, -1 |
Line 66... | Line 66... | ||
66 | 66 | ||
67 | mcall 12, 1 |
67 | mcall 12, 1 |
68 | 68 | ||
69 | mcall 48, 4 ; get skin height |
- | |
70 | mov ecx, 300*0x10000+184 |
- | |
71 | add ecx, eax |
- | |
72 | mov edx, 0x34000000 |
69 | mcall 48, 4 ; get skin height |
73 | or edx, [sys_colors.work] |
70 | mov ecx, 200*0x10000+PANEL_Y+33 |
74 | mov esi, 0x80000000 |
71 | add ecx, eax |
75 | or esi, [sys_colors.grab_text] |
72 | mov ebx, 200*0x10000+BUTTON_SPACE*16+TABLE_BEGIN_X+TABLE_BEGIN_X+9 |
Line 76... | Line 73... | ||
76 | mcall 0, <300,315>, , , , window_title |
73 | mcall 0, , , 0x34AAAaaa, 0x80000000, window_title |
77 | test [proc_info.wnd_state], 0x04 |
74 | test [proc_info.wnd_state], 0x04 |
Line 174... | Line 171... | ||
174 | mov [button_x], TABLE_BEGIN_X |
171 | mov [button_x], TABLE_BEGIN_X |
175 | mov [button_y], TABLE_BEGIN_Y |
172 | mov [button_y], TABLE_BEGIN_Y |
176 | ret |
173 | ret |
177 | @@: inc [symbol_current] |
174 | @@: inc [symbol_current] |
178 | add [button_x], BUTTON_SPACE |
175 | add [button_x], BUTTON_SPACE |
179 | cmp [button_x], 306 ; the last in row? |
176 | cmp [button_x], BUTTON_SPACE*16+TABLE_BEGIN_X ; the last in row? |
180 | jne .next_button |
177 | jne .next_button |
181 | add [button_y], BUTTON_SPACE ; next row |
178 | add [button_y], BUTTON_SPACE ; next row |
182 | mov [button_x], TABLE_BEGIN_X |
179 | mov [button_x], TABLE_BEGIN_X |
183 | jmp .next_button |
180 | jmp .next_button |
184 | ret |
181 | ret |
185 | endp |
182 | endp |
Line 186... | Line 183... | ||
186 | 183 | ||
187 | - | ||
188 | proc draw_button |
- | |
189 | mov ebx, [button_x] |
- | |
190 | shl ebx, 16 |
- | |
191 | mov bx, BUTTON_SIDE |
- | |
192 | mov ecx, [button_y] |
- | |
193 | shl ecx, 16 |
184 | |
194 | mov cx, BUTTON_SIDE |
185 | proc draw_button |
195 | mov edx, 0x80000000 |
186 | mov edx, 0x80000000 |
196 | mov dl, [symbol_current] |
187 | mov dl, [symbol_current] |
- | 188 | add edx, BUTTON_ID_SHIFT |
|
197 | add edx, BUTTON_ID_SHIFT |
189 | mov esi, 0xFFFfff |
198 | mcall 8, , , |
190 | mcall 8, <[button_x],BUTTON_SIDE>, <[button_y],BUTTON_SIDE> |
199 | and edx, 0x7FFFFFFF |
191 | and edx, 0x7FFFFFFF |
Line 200... | Line 192... | ||
200 | or edx, 0x20000000 |
192 | or edx, 0x20000000 |
201 | mcall , , , , [sys_colors.work_button] |
193 | mcall |
202 | 194 | ||
203 | test edi, edi ; is focused? |
195 | test edi, edi ; is focused? |
Line 236... | Line 228... | ||
236 | add ebx, 0x00010001 |
228 | add ebx, 0x00010001 |
237 | mcall |
229 | mcall |
Line 238... | Line 230... | ||
238 | 230 | ||
239 | .symbol: |
231 | .symbol: |
240 | mov ebx, [button_x] |
232 | mov ebx, [button_x] |
241 | add ebx, 6 |
233 | add ebx, 9 |
242 | shl ebx, 16 |
234 | shl ebx, 16 |
243 | add ebx, [button_y] |
235 | add ebx, [button_y] |
244 | add ebx, 5 |
236 | add ebx, 7 |
Line 245... | Line 237... | ||
245 | mcall 4, , [sys_colors.work_button_text], symbol_current, 1 |
237 | mcall 4, , 0x01000000, symbol_current, 1 |
246 | 238 | ||
Line 247... | Line 239... | ||
247 | ret |
239 | ret |
Line 248... | Line 240... | ||
248 | endp |
240 | endp |
249 | - | ||
250 | 241 | ||
251 | proc draw_page_switcher _blinking |
242 | |
252 | 243 | proc draw_page_switcher _blinking |
|
253 | mcall 8, , , 0x8000FFAA |
244 | |
254 | 245 | mcall 8, , , 0x8000FFAA |
|
Line 255... | Line 246... | ||
255 | mov esi, [sys_colors.work_button] |
246 | mov esi, 0xCCCccc |
256 | cmp [_blinking], 1 ; blinking? |
- | |
257 | jne @f |
247 | cmp [_blinking], 1 ; blinking? |
258 | mov esi, PAGE_SWITCHER_BLINK_COLOR |
248 | jne @f |
259 | @@: mcall , <2,60>, <157,19>, 0x2000FFAA |
249 | mov esi, SWITCHER_BLINK_COLOR |
260 | 250 | @@: mcall , <2,98>, |
|
261 | mov ecx, 0x80000000 |
251 | |
- | 252 | mov ecx, 0x81000000 |
|
- | 253 | mov edx, string_000_127 |
|
262 | or ecx, [sys_colors.work_button_text] |
254 | cmp [symbol_start], 0 ; first page? |
263 | mov edx, string_000_127 |
255 | je @f |
Line 264... | Line 256... | ||
264 | cmp [symbol_start], 0 ; first page? |
256 | mov edx, string_128_255 ; ok, the second one |
Line 265... | Line -... | ||
265 | je @f |
- | |
266 | mov edx, string_128_255 ; ok, the second one |
- | |
267 | @@: mcall 4, <11,164>, |
- | |
268 | ret |
- | |
269 | endp |
257 | @@: mcall 4, <10,PANEL_Y+6>, |
270 | - | ||
271 | - | ||
272 | proc draw_codes |
258 | mcall , <115,PANEL_Y+6>, 0x81000000, string_ASCII_CODE |
273 | 259 | ||
Line 274... | Line 260... | ||
274 | mov ecx, 0x80000000 |
260 | ret |
275 | or ecx, [sys_colors.work_text] |
261 | endp |
Line 276... | Line 262... | ||
276 | mcall 4, <80,164>, , string_ASCII_CODE |
262 | |
277 | mcall , <180,164>, , string_ASCII_HEX_CODE |
263 | |
Line 278... | Line 264... | ||
278 | movzx ecx, [symbol_focused] |
264 | proc draw_codes |
279 | mov esi, 0x40000000 |
265 | |
280 | or esi, [sys_colors.work_text] |
266 | movzx ecx, [symbol_focused] |
281 | mcall 47, 0x00030000, , <152,164>, , [sys_colors.work] |
267 | mcall 47, 0x00030000, , <250,PANEL_Y+6>, 0x41000000, 0xAAAaaa |
282 | mcall , 0x00020100, , <276,164>, |
- | |
Line 283... | Line 268... | ||
283 | 268 | mcall , 0x00020100, , <500,PANEL_Y+6>, |
|
284 | ret |
269 | |
Line 285... | Line 270... | ||
285 | endp |
270 | ret |
Line 303... | Line 288... | ||
303 | 288 | ||
304 | symbol_unfocused db 0 |
289 | symbol_unfocused db 0 |
305 | symbol_focused db 0 |
290 | symbol_focused db 0 |
306 | i_end: |
291 | i_end: |
307 | proc_info process_information |
- | |
308 | sys_colors system_colors |
292 | proc_info process_information |
309 | rb 0x400 ;stack |
293 | rb 0x400 ;stack |