9,7 → 9,7 |
|
; <--- include all MeOS stuff ---> |
include "lang.inc" |
include "macros.inc" |
include "..\..\..\..\macros.inc" |
|
|
; <--- start of MenuetOS application ---> |
23,7 → 23,7 |
mov ebx,3 |
mov ecx,sc |
mov edx,sizeof.system_colors |
int 0x40 |
mcall |
|
redraw: ; redraw event handler |
call draw_window ; at first create and draw the window |
30,7 → 30,7 |
|
wait_event: ; main cycle |
mov eax, 10 |
int 0x40 |
mcall |
|
dec eax ; if event = 1 |
jz redraw ; jump to redraw handler |
40,17 → 40,17 |
|
button: ; button event handler |
mov al, 17 ; get button identifier |
int 0x40 |
mcall |
|
cmp ah, 1 |
jne wait_event ; return if button id != 1 |
|
or eax, -1 ; exit application |
int 0x40 |
mcall |
|
key: ; key event handler |
mov al, 2 ; get key code |
int 0x40 |
mcall |
|
jmp wait_event |
|
57,7 → 57,7 |
draw_window: |
mov eax, 12 ; start drawing |
mov ebx, 1 |
int 0x40 |
mcall |
|
xor eax, eax ; create and draw the window |
mov ebx, 100*65536+200 ; (window_cx)*65536+(window_sx) |
64,12 → 64,12 |
mov ecx, 100*65536+100 ; (window_cy)*65536+(window_sy) |
mov edx, [sc.work] ; work area color |
or edx, 0x33000000 ; & window type 3 |
mov edi, header ; window header |
mov edi, title ; window title |
int 0x40 |
|
mov eax, 12 ; finish drawing |
mov ebx, 2 |
int 0x40 |
mcall |
|
ret |
|
77,11 → 77,11 |
DATA |
|
if lang eq ru |
header db ' ¡«® ¯à®£à ¬¬ë',0 |
title db ' ¡«® ¯à®£à ¬¬ë',0 |
else if lang eq fr |
header db 'La programme poncive',0 |
title db 'La programme poncive',0 |
else |
header db 'Template program',0 |
title db 'Template program',0 |
end if |
|
; <--- uninitialised data ---> |