DESKTOP - checking for "rolled up" window

git-svn-id: svn://kolibrios.org@2068 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Marat Zakiyanov (Mario79) 2011-08-18 20:07:22 +00:00
parent bac66b8f17
commit d6eaee0538

View File

@ -460,76 +460,6 @@ save_file:
mcall 70 mcall 70
ret ret
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
;read_string:
;
; pusha
;
; mov edi,fname
; mov al,'_'
; mov ecx,87
; cld
; rep stosb
;
; call print_text
;
; mov edi,fname
;
; f11:
; mov eax,10
; mcall
; cmp eax,2
; jne read_done
;; mov eax,2
; mcall
; shr eax,8
; cmp eax,13
; je read_done
; cmp eax,8
; jne nobsl
; cmp edi,fname
; je f11
; dec edi
; mov [edi],byte '_'
; call print_text
; jmp f11
; nobsl:
; mov [edi],al
;
; call print_text
;
; inc edi
; cmp edi, fname+87
; jne f11
;
; read_done:
;
; mov ecx, fname+88
; sub ecx, edi
; mov eax, 0
; cld
; rep stosb
;
; call print_text
;
; popa
;
; ret
;print_text:
; pushad
;
; mpack ebx,15,6*87+4
; mpack ecx,(30+18*10+2),11
; mcall 13,,,[w_work]
;
; mpack ebx,17,(30+18*10+4)
; mcall 4,,[w_work_text],fname,87
;
; popad
;ret
draw_color: draw_color:
pusha pusha
@ -554,10 +484,8 @@ draw_color:
mcall mcall
popa popa
ret ret
;----------------------------------------------------------------------
draw_colours: draw_colours:
pusha pusha
@ -576,10 +504,8 @@ draw_colours:
jbe newcol jbe newcol
popa popa
ret ret
;----------------------------------------------------------------------
draw_framerect: ; ebx,ecx draw_framerect: ; ebx,ecx
push ebx ecx push ebx ecx
add bx,[esp+6] add bx,[esp+6]
@ -604,7 +530,7 @@ draw_framerect: ; ebx,ecx
mcall mcall
add esp,8 add esp,8
ret ret
;----------------------------------------------------------------------
find_bitmap: find_bitmap:
mov edi,[ebp+SKIN_HEADER.bitmaps] mov edi,[ebp+SKIN_HEADER.bitmaps]
add edi,ebp add edi,ebp
@ -621,7 +547,7 @@ find_bitmap:
.lp2: ret .lp2: ret
@@: add edi,8 @@: add edi,8
jmp .lp1 jmp .lp1
;----------------------------------------------------------------------
dec_edx: dec_edx:
sub dl,4 sub dl,4
jnc @f jnc @f
@ -635,7 +561,7 @@ dec_edx:
xor dl,dl xor dl,dl
@@: rol edx,16 @@: rol edx,16
ret ret
;----------------------------------------------------------------------
area: area:
.x = 345 .x = 345
.y = 20 .y = 20
@ -666,7 +592,7 @@ wnd4:
virtual at edi+SKIN_PARAMS.dtp.data virtual at edi+SKIN_PARAMS.dtp.data
dtp system_colors dtp system_colors
end virtual end virtual
;----------------------------------------------------------------------
draw_skin: draw_skin:
mcall 13,<area.x,area.width>,<area.y+2,area.height-2>,0x00FFFFFF mcall 13,<area.x,area.width>,<area.y+2,area.height-2>,0x00FFFFFF
@ -916,32 +842,23 @@ draw_PathShow:
; ********************************************* ; *********************************************
; ******* WINDOW DEFINITIONS AND DRAW ******** ; ******* WINDOW DEFINITIONS AND DRAW ********
; ********************************************* ; *********************************************
draw_window: draw_window:
mcall 12,1
mcall 48,3,app_colours,10*4
mcall 14
; DRAW WINDOW
xor eax,eax ; function 0 : define and draw window
xor esi,esi
mov edx,[w_work] ; color of work area RRGGBB,8->color
or edx,0x14000000
mcall ,<110,555>,<50,275>,,,title
mov eax,12 ; function 12:tell os about windowdraw mcall 9,procinfo,-1
mov ebx,1 ; 1, start of draw
mcall mov eax,[procinfo+70] ;status of window
test eax,100b
mov eax,48 jne .end
mov ebx,3
mov ecx,app_colours
mov edx,10*4
mcall
mov eax,14
mcall
; DRAW WINDOW
mov eax,0 ; function 0 : define and draw window
mov ebx,110*65536+555 ; [x start] *65536 + [x size]
mov ecx,50*65536+275 ; [y start] *65536 + [y size]
mov edx,[w_work] ; color of work area RRGGBB,8->color
or edx,0x14000000
mov edi,title ; WINDOW LABEL
mcall
if lang eq ru if lang eq ru
load_w = (5*2+6*9) load_w = (5*2+6*9)
save_w = (5*2+6*9) save_w = (5*2+6*9)
@ -954,153 +871,106 @@ else
apply_w = (5*2+6*7) apply_w = (5*2+6*7)
end if end if
; mov eax,8 ; FILENAME BUTTON ; LOAD BUTTON
; mov ebx,5*65536+545 ; mov ebx,15*65536+load_w
; mov ecx,212*65536+10 ; mov ecx,(35+18*12)*65536+14
; mov edx,0x4000000B mcall 8,<15,load_w>,<35+18*12,14>,12,[w_work_button]
; mov esi,[w_grab_button] ; button color RRGGBB ; SAVE BUTTON
; mcall add ebx,(load_w+2)*65536-load_w+save_w
inc edx
mov eax,8 ; LOAD BUTTON mcall
mov ebx,15*65536+load_w ; 3D
mov ecx,(35+18*12)*65536+14 mov ebx,(340-t1.size*6-13)*65536+(5*2+6*4)
mov edx,12 inc edx
mov esi,[w_work_button] mcall
mcall ; FLAT
add ebx,(5*2+6*4+2)*65536-(5*2+6*4)+flat_w
; mov eax,8 ; SAVE BUTTON inc edx
add ebx,(load_w+2)*65536-load_w+save_w mcall
inc edx ; APPLY BUTTON
mcall add ebx,(flat_w+6+2)*65536-flat_w+apply_w
inc edx
; mov eax,8 ; 3D mcall
; mov ebx,15*65536+35 ; LOAD SKIN BUTTON
; mov ecx,(30+18*12)*65536+14 mov ebx,(336+(555-335)/2-t2.size*6/2)*65536+load_w
mov ebx,(340-t1.size*6-13)*65536+(5*2+6*4) inc edx
inc edx mcall
mcall ; APPLY SKIN BUTTON
add ebx,(load_w+6+2)*65536-load_w+apply_w
; mov eax,8 ; FLAT inc edx
add ebx,(5*2+6*4+2)*65536-(5*2+6*4)+flat_w mcall
inc edx
mcall
; mov eax,8 ; APPLY BUTTON
add ebx,(flat_w+6+2)*65536-flat_w+apply_w
inc edx
mcall
; mov eax,8 ; LOAD SKIN BUTTON
mov ebx,(336+(555-335)/2-t2.size*6/2)*65536+load_w
inc edx
mcall
; mov eax,8 ; APPLY SKIN BUTTON
add ebx,(load_w+6+2)*65536-load_w+apply_w
inc edx
mcall
mov eax, 4
mov ebx, (339-t1.size*6-12)*65536+(35+18*12+4)
mov ecx, [w_work_button_text]
mov edx, t1
mov esi, t1.size
mcall
mov ebx,(336+(555-335)/2-t2.size*6/2)*65536+(35+18*12+4)
mov edx,t2
mov esi,t2.size
mcall
mov ebx,(15+(load_w+save_w+2-t3.size*6)/2)*65536+(35+18*12+4)
mov edx,t3
mov esi,t3.size
mcall
; mov eax, 4
; mov ebx, 277*65536+(30+18*12+4)
; mov edx, t2
; mov esi, t2.size
; mcall
mov eax,38 ; R G B COLOR GLIDES
mov ebx,266*65536+285
mov ecx,30*65536+30
mov edx,0xff0000
.newl:
mcall
pusha
add ebx,20*65536+20
shr edx,8
mcall
add ebx,20*65536+20
shr edx,8
mcall
popa
sub edx,0x020000
add ecx,0x00010001
cmp ecx,158*65536+158
jnz .newl
call draw_color
mov edx,31 ; BUTTON ROW
mov ebx,15*65536+200
mov ecx,30*65536+14
mov esi,[w_work_button]
newb:
mov eax,8
mcall
add ecx,18*65536
inc edx
cmp edx,40
jbe newb
mov ebx,15*65536+34 ; ROW OF TEXTS
mov ecx,[w_work_button_text]
mov edx,text
mov esi,32
newline:
mov eax,4
mcall
add ebx,18
add edx,32
cmp [edx],byte 'x'
jne newline
call draw_colours
call draw_PathShow
; mcall 13,<5,546>,<212,11>,[w_work] mov ebx,(339-t1.size*6-12)*65536+(35+18*12+4)
; mcall 13,<337,7>,<2,250>,[w_frame] mcall 4,,[w_work_button_text],t1,t1.size
; shr edx,1
; and edx,0x007F7F7F mov ebx,(336+(555-335)/2-t2.size*6/2)*65536+(35+18*12+4)
; mcall 38,<336,336>,<20,250> mcall ,,,t2,t2.size
; add ebx,0x00080008
; mcall mov ebx,(15+(load_w+save_w+2-t3.size*6)/2)*65536+(35+18*12+4)
; sub ebx,0x00040004 mcall ,,,t3,t3.size
; mcall ,,<0,255>
; mcall ,<5,550>,<211,211> mov eax,38 ; R G B COLOR GLIDES
; add ecx,0x000C000C mov ebx,266*65536+285
; mcall mov ecx,30*65536+30
mov edx,0xff0000
; call print_text ;-----------------------------------
.newl:
cmp dword[not_packed_area+SKIN_HEADER.ident],'SKIN' mcall
jne @f pusha
call draw_skin add ebx,20*65536+20
@@: shr edx,8
mcall
mov eax,12 ; function 12:tell os about windowdraw add ebx,20*65536+20
mov ebx,2 ; 2, end of draw shr edx,8
mcall mcall
popa
ret sub edx,0x020000
add ecx,0x00010001
cmp ecx,158*65536+158
jnz .newl
;-----------------------------------
call draw_color
mov edx,31 ; BUTTON ROW
mov ebx,15*65536+200
mov ecx,30*65536+14
mov esi,[w_work_button]
mov eax,8
;-----------------------------------
.newb:
mcall
add ecx,18*65536
inc edx
cmp edx,40
jbe .newb
;-----------------------------------
mov ebx,15*65536+34 ; ROW OF TEXTS
mov ecx,[w_work_button_text]
mov edx,text
mov esi,32
mov eax,4
;-----------------------------------
.newline:
mcall
add ebx,18
add edx,32
cmp [edx],byte 'x'
jne .newline
;-----------------------------------
call draw_colours
call draw_PathShow
cmp dword[not_packed_area+SKIN_HEADER.ident],'SKIN'
jne @f
call draw_skin
@@:
.end:
mcall 12,2
ret
;---------------------------------------------------------------------
; DATA AREA ; DATA AREA
;---------------------------------------------------------------------
lsz text,\ lsz text,\
ru, ' <20>€ŚŠ€ ŽŠŤ€ ',\ ru, ' <20>€ŚŠ€ ŽŠŤ€ ',\
ru, ' ŹŽ‹Ž‘€ ‡€<E280A1>ŽŽŠ€ ',\ ru, ' ŹŽ‹Ž‘€ ‡€<E280A1>ŽŽŠ€ ',\