Subversion Repositories Kolibri OS

Rev

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

Rev 7957 Rev 8365
Line 14... Line 14...
14
PANEL_Y              = BUTTON_SPACE*8+TABLE_BEGIN_Y+TABLE_BEGIN_Y
14
PANEL_Y              = BUTTON_SPACE*8+TABLE_BEGIN_Y+TABLE_BEGIN_Y
Line 15... Line 15...
15
 
15
 
16
FOCUS_SQUARE_COLOR   = 0x000080FF
16
FOCUS_SQUARE_COLOR   = 0x000080FF
Line -... Line 17...
-
 
17
SWITCHER_BLINK_COLOR = 0x00808080
-
 
18
 
-
 
19
FONT_SMALL = 0x01000000
Line 17... Line 20...
17
SWITCHER_BLINK_COLOR = 0x00808080
20
FONT_BIG   = 0x10000000
18
 
21
 
19
 
22
 
20
start:
23
start:
Line 31... Line 34...
31
 
34
 
32
        cmp     eax, 1
35
        cmp     eax, 1
33
        je      quit
36
        je      quit
34
        cmp     ax, 0xFFAA                      ; page switcher
37
        cmp     ax, 0xFFAA                      ; page switcher
-
 
38
        je      .switch_page                    ; any button with a character
-
 
39
        cmp     ax, 0xEEBB                      ; page switcher
35
        je      .switch_page                    ; any button with a character
40
        je      .switch_font                    
36
  .change_focus:
41
  .change_focus:
37
        mov     bl, [symbol_focused]
42
        mov     bl, [symbol_focused]
38
        mov     [symbol_unfocused], bl
43
        mov     [symbol_unfocused], bl
39
        sub     ax, BUTTON_ID_SHIFT             ; get the corresponding character
44
        sub     ax, BUTTON_ID_SHIFT             ; get the corresponding character
40
        mov     [symbol_focused], al
45
        mov     [symbol_focused], al
41
        stdcall draw_table, 0
46
        stdcall draw_table, 0
42
        call    draw_codes
47
        call    draw_codes
-
 
48
        jmp     still
-
 
49
  .switch_font:
-
 
50
        cmp     [font_type], FONT_SMALL
-
 
51
		jne     @f
-
 
52
		mov     [font_type], FONT_BIG
-
 
53
		jmp     redraw
-
 
54
    @@: mov     [font_type], FONT_SMALL
43
        jmp     still
55
	    jmp     redraw
44
  .switch_page:
56
  .switch_page:
45
        movzx   bx, [symbol_start]
57
        movzx   bx, [symbol_start]
46
        add     bx, BUTTON_ID_SHIFT
58
        add     bx, BUTTON_ID_SHIFT
47
        mov     cx, 128                         ; half of page
59
        mov     cx, 128                         ; half of page
Line 75... Line 87...
75
        jnz     @f
87
        jnz     @f
Line 76... Line 88...
76
 
88
 
77
        stdcall draw_table, 1
89
        stdcall draw_table, 1
78
        call    draw_codes
90
        call    draw_codes
-
 
91
        stdcall draw_page_switcher, 0
Line 79... Line 92...
79
        stdcall draw_page_switcher, 0
92
		stdcall draw_font_switcher
80
 
93
 
81
    @@:
94
    @@:
Line 232... Line 245...
232
        mov     ebx, [button_x]
245
        mov     ebx, [button_x]
233
        add     ebx, 9
246
        add     ebx, 9
234
        shl     ebx, 16
247
        shl     ebx, 16
235
        add     ebx, [button_y]
248
        add     ebx, [button_y]
236
        add     ebx, 7
249
        add     ebx, 7
-
 
250
		mov     ecx, [font_type]
237
        mcall   4, , 0x01000000, symbol_current, 1
251
        mcall   4, , , symbol_current, 1
Line 238... Line 252...
238
 
252
 
239
        ret
253
        ret
Line 245... Line 259...
245
        mcall   8, , , 0x8000FFAA
259
        mcall   8, , , 0x8000FFAA
246
        mov     esi, 0xCCCccc
260
        mov     esi, 0xCCCccc
247
        cmp     [_blinking], 1                  ; blinking?
261
        cmp     [_blinking], 1                  ; blinking?
248
        jne     @f
262
        jne     @f
249
        mov     esi, SWITCHER_BLINK_COLOR
263
        mov     esi, SWITCHER_BLINK_COLOR
250
    @@: mcall   , <2,98>, , 0x2000FFAA
264
    @@: mcall   , <2,98>, , 0x0000FFAA
Line 251... Line 265...
251
 
265
 
252
        mov     ecx, 0x81000000
266
        mov     ecx, 0x81000000
253
        mov     edx, string_000_127
267
        mov     edx, string_000_127
254
        cmp     [symbol_start], 0               ; first page?
268
        cmp     [symbol_start], 0               ; first page?
255
        je      @f
269
        je      @f
256
        mov     edx, string_128_255             ; ok, the second one
270
        mov     edx, string_128_255             ; ok, the second one
257
    @@: mcall   4, <10,PANEL_Y+6>,
271
    @@: mcall   4, <10,PANEL_Y+6>,
-
 
272
        mcall    , <278,PANEL_Y+6>, 0x81000000, string_ASCII_CODE
-
 
273
 
-
 
274
        ret
-
 
275
endp
-
 
276
 
-
 
277
proc    draw_font_switcher
-
 
278
 
-
 
279
        mcall   8, <120,136>, , 0x0000EEBB
-
 
280
 
-
 
281
        mov     edx, string_font_small
-
 
282
        cmp     [font_type], FONT_SMALL
-
 
283
        je      @f
-
 
284
        mov     edx, string_font_big
Line 258... Line 285...
258
        mcall    , <115,PANEL_Y+6>, 0x81000000, string_ASCII_CODE
285
    @@: mcall   4, <130,PANEL_Y+6>,,,10
259
 
286
 
Line 260... Line 287...
260
        ret
287
        ret
Line 261... Line 288...
261
endp
288
endp
262
 
289
 
263
 
290
 
Line 264... Line 291...
264
proc    draw_codes
291
proc    draw_codes
265
 
292
 
Line 276... Line 303...
276
 
303
 
277
 
304
 
278
szZ window_title                ,'ASCIIVju'
305
szZ window_title        ,'ASCIIVju'
-
 
306
szZ string_000_127      ,'000-127'
-
 
307
szZ string_128_255      ,'128-255'
279
szZ string_000_127              ,'000-127'
308
szZ string_font_small   ,'Font1 6x9 '
Line 280... Line 309...
280
szZ string_128_255              ,'128-255'
309
szZ string_font_big     ,'Font2 8x14'
281
szZ string_ASCII_CODE           ,'ASCII Code:      ASCII Hex-Code:'
310
szZ string_ASCII_CODE   ,'Code:     Hex-Code:'
Line -... Line 311...
-
 
311
 
-
 
312
button_x                dd 2
282
 
313
button_y                dd 2
283
button_x                dd 2
314
 
Line 284... Line 315...
284
button_y                dd 2
315
font_type               dd FONT_SMALL
285
 
316