forked from KolibriOS/kolibrios
test: skinned window
git-svn-id: svn://kolibrios.org@2108 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
0c6766a030
commit
d394246f2d
@ -22,8 +22,7 @@ START: ; start of execution
|
|||||||
|
|
||||||
still:
|
still:
|
||||||
|
|
||||||
mov eax,10 ; wait here for event
|
mcall 10 ; wait here for event
|
||||||
int 0x40
|
|
||||||
|
|
||||||
cmp eax,1 ; redraw request ?
|
cmp eax,1 ; redraw request ?
|
||||||
jz red
|
jz red
|
||||||
@ -51,7 +50,7 @@ still:
|
|||||||
|
|
||||||
cmp ah,1 ; button id=1 ?
|
cmp ah,1 ; button id=1 ?
|
||||||
jnz noclose
|
jnz noclose
|
||||||
mov eax,0xffffffff ; close this program
|
mov eax,-1 ; close this program
|
||||||
int 0x40
|
int 0x40
|
||||||
noclose:
|
noclose:
|
||||||
|
|
||||||
@ -104,41 +103,17 @@ still:
|
|||||||
|
|
||||||
draw_window:
|
draw_window:
|
||||||
|
|
||||||
mov eax,12 ; function 12:tell os about windowdraw
|
;mcall 48, 3, sys_colors, 40
|
||||||
mov ebx,1 ; 1, start of draw
|
|
||||||
int 0x40
|
|
||||||
|
|
||||||
; DRAW WINDOW
|
mcall 12, 1
|
||||||
mov eax,0 ; function 0 : define and draw window
|
|
||||||
mov ebx,100*65536+300 ; [x start] *65536 + [x size]
|
|
||||||
mov ecx,100*65536+240 ; [y start] *65536 + [y size]
|
|
||||||
mov edx,0x02ffffff ; color of work area RRGGBB
|
|
||||||
mov esi,0x80597799 ; color of grab bar RRGGBB,8->color glide
|
|
||||||
mov edi,0x00597799 ; color of frames RRGGBB
|
|
||||||
int 0x40
|
|
||||||
|
|
||||||
; WINDOW LABEL
|
|
||||||
mov eax,4 ; function 4 : write text to window
|
|
||||||
mov ebx,8*65536+8 ; [x start] *65536 + [y start]
|
|
||||||
mov ecx,0x00ffffff ; color of text RRGGBB
|
|
||||||
mov edx,tlabel ; pointer to text beginning
|
|
||||||
mov esi,labellen-tlabel ; text length
|
|
||||||
int 0x40
|
|
||||||
|
|
||||||
; CLOSE BUTTON
|
|
||||||
mov eax,8 ; function 8 : define and draw button
|
|
||||||
mov ebx,(300-19)*65536+12 ; [x start] *65536 + [x size]
|
|
||||||
mov ecx,5*65536+12 ; [y start] *65536 + [y size]
|
|
||||||
mov edx,1 ; button id
|
|
||||||
mov esi,0x5977bb ; button color RRGGBB
|
|
||||||
int 0x40
|
|
||||||
|
|
||||||
|
mcall 0, <200,292>, <200,230>, 0x14FFFFFF,,tlabel
|
||||||
|
|
||||||
mov eax,8 ; function 8 : define and draw button
|
mov eax,8 ; function 8 : define and draw button
|
||||||
mov ebx,25*65536+9 ; [x start] *65536 + [x size]
|
mov ebx,32*65536+10 ; [x start] *65536 + [x size]
|
||||||
mov ecx,74*65536+9 ; [y start] *65536 + [y size]
|
mov ecx,75*65536+10 ; [y start] *65536 + [y size]
|
||||||
mov edx,2 ; button id
|
mov edx,2 ; button id
|
||||||
mov esi,0x5977bb ; button color RRGGBB
|
mov esi,0x6888B8 ; button color RRGGBB
|
||||||
newb:
|
newb:
|
||||||
int 0x40
|
int 0x40
|
||||||
add ecx,20*65536
|
add ecx,20*65536
|
||||||
@ -147,7 +122,7 @@ draw_window:
|
|||||||
jb newb
|
jb newb
|
||||||
|
|
||||||
cld
|
cld
|
||||||
mov ebx,25*65536+36 ; draw info text with function 4
|
mov ebx,26*65536+37 ; draw info text with function 4
|
||||||
mov ecx,0x000000
|
mov ecx,0x000000
|
||||||
mov edx,text
|
mov edx,text
|
||||||
mov esi,40
|
mov esi,40
|
||||||
@ -160,21 +135,19 @@ draw_window:
|
|||||||
jnz newline
|
jnz newline
|
||||||
|
|
||||||
|
|
||||||
mov eax,12 ; function 12:tell os about windowdraw
|
mcall 12, 2 ; function 12:tell os about windowdraw
|
||||||
mov ebx,2 ; 2, end of draw
|
|
||||||
int 0x40
|
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
; DATA AREA
|
; DATA AREA
|
||||||
|
|
||||||
|
|
||||||
text:
|
text:
|
||||||
|
|
||||||
db 'APPLICATION USES 0x10000 BYTES OF MEMORY'
|
db 'Application uses 0x10000 bytes of memory'
|
||||||
db ' '
|
db ' '
|
||||||
db 'OPEN DEBUG BOARD FOR PARAMETERS '
|
db 'Open debug board for rezult information '
|
||||||
db ' '
|
db ' '
|
||||||
db ' CLI '
|
db ' CLI '
|
||||||
db ' '
|
db ' '
|
||||||
@ -194,7 +167,7 @@ text:
|
|||||||
|
|
||||||
|
|
||||||
tlabel:
|
tlabel:
|
||||||
db 'MENUET PROTECTION TEST'
|
db 'Kolibri protection test',0
|
||||||
labellen:
|
|
||||||
|
|
||||||
I_END:
|
I_END:
|
||||||
|
Loading…
Reference in New Issue
Block a user