Subversion Repositories Kolibri OS

Rev

Rev 114 | Rev 379 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 114 Rev 115
Line 68... Line 68...
68
 
68
 
69
        shr   eax,16
69
        shr   eax,16
70
        shr   ebx,16
70
        shr   ebx,16
Line 71... Line 71...
71
        mov   edx,[0x3010]
71
        mov   edx,[0x3010]
72
 
72
 
73
        add   eax,[edx-twdw]
73
		add   eax,[edx-twdw + WDATA.box.left]
74
        add   ebx,[edx-twdw+4]
74
		add   ebx,[edx-twdw + WDATA.box.top]
75
        mov   cx,ax
75
        mov   cx,ax
76
        mov   dx,bx
76
        mov   dx,bx
77
        shl   eax,16
77
        shl   eax,16
Line 196... Line 196...
196
        pushad                       ; button body
196
        pushad                       ; button body
197
        push  ebx
197
        push  ebx
198
        shr   eax,16
198
        shr   eax,16
199
        shr   ebx,16
199
        shr   ebx,16
200
        mov   edx,[0x3010]
200
        mov   edx,[0x3010]
201
        mov   esi,[edx-twdw]
201
		mov   esi,[edx-twdw + WDATA.box.left]
202
        mov   edi,[edx-twdw+4]
202
		mov   edi,[edx-twdw + WDATA.box.top]
203
        add   eax,esi
203
        add   eax,esi
204
        add   ebx,edi
204
        add   ebx,edi
205
        mov   cx,ax
205
        mov   cx,ax
206
        mov   dx,bx
206
        mov   dx,bx
207
        shl   eax,16
207
        shl   eax,16
Line 235... Line 235...
235
 
235
 
Line 236... Line 236...
236
      button_no_draw:
236
      button_no_draw:
Line 237... Line -...
237
 
-
 
238
        and   ecx,0xffff
-
 
239
 
-
 
240
        mov   edi,[0x3010]
237
 
241
        sub   edi,twdw
238
        and   ecx,0xffff
242
 
239
 
243
        mov   edi,[0xfe88]
240
        mov   edi,[0xfe88]
244
        movzx eax,word [edi]
241
        movzx eax,word [edi]
Line 329... Line 326...
329
        pushad
326
        pushad
Line 330... Line 327...
330
 
327
 
331
        movzx ebx,word [eax+0]
328
        movzx ebx,word [eax+0]
332
        shl   ebx,5
329
        shl   ebx,5
333
        add   ebx,window_data
330
        add   ebx,window_data
334
        movzx ecx,word [ebx+0]     ; window x start
331
		mov   ecx, [ebx+ WDATA.box.left]     ; window x start
335
        movzx edx,word [eax+4]     ; button x start
332
        movzx edx,word [eax+4]     ; button x start
336
        add   ecx,edx
333
        add   ecx,edx
Line 337... Line 334...
337
        push  ecx
334
        push  ecx
338
 
335
 
339
        mov   dx,[eax+6]     ; button x size
336
		mov   dx,[eax+6]                 ; button x size
340
        add   cx,dx
337
        add   cx,dx
341
        mov   esi,ecx
338
        mov   esi,ecx
342
        inc   esi
339
        inc   esi
343
        mov   cx,[ebx+4]     ; window y start
340
		mov   ecx, [ebx+WDATA.box.top]   ; window y start
344
        mov   dx,[eax+8]     ; button y start
341
		mov   dx,[eax+8]                 ; button y start
345
        add   ecx,edx
342
        add   ecx,edx
346
        mov   ebx,ecx
343
        mov   ebx,ecx
Line 519... Line 516...
519
        jnz     buttonnewcheck
516
        jnz     buttonnewcheck
Line 520... Line 517...
520
 
517
 
521
;    add   ebx,window_data
518
;    add   ebx,window_data
522
;    mov   ecx,[window_data+ebx+8]          ; window end X
519
;    mov   ecx,[window_data+ebx+8]          ; window end X
523
    movzx edx,word [eax+4]     ; button start X
520
    movzx edx,word [eax+4]     ; button start X
524
    cmp   edx, [window_data+ebx+8] ;ecx
521
    cmp   edx, [window_data+ebx+WDATA.box.width] ;ecx
Line 525... Line 522...
525
    jge   buttonnewcheck
522
    jge   buttonnewcheck
526
 
523
 
527
;    mov   ecx,[window_data+ebx+12]         ; window end Y
524
;    mov   ecx,[window_data+ebx+12]         ; window end Y
528
    movzx edx, word [eax+8]    ; button start Y
525
    movzx edx, word [eax+8]    ; button start Y
Line 529... Line 526...
529
    cmp   edx, [window_data+ebx+12] ;ecx
526
    cmp   edx, [window_data+ebx+WDATA.box.height] ;ecx
530
    jge   buttonnewcheck
527
    jge   buttonnewcheck
531
 
528
 
532
    ; check coordinates
529
    ; check coordinates
533
                               ; mouse x >= button x ?
530
                               ; mouse x >= button x ?
534
    movzx ebx,word [eax+0]
531
    movzx ebx,word [eax+0]
535
    shl   ebx,5
532
    shl   ebx,5
536
    add   ebx,window_data
533
    add   ebx,window_data
537
    movzx ecx,word [ebx+0]     ; window x start
534
	mov   ecx, [ebx+WDATA.box.left]     ; window x start
538
    movzx edx,word [eax+4]     ; button x start
535
    movzx edx,word [eax+4]     ; button x start
539
    add   edx,ecx
536
    add   edx,ecx
Line 548... Line 545...
548
 
545
 
549
                               ; mouse y >= button y ?
546
                               ; mouse y >= button y ?
550
    movzx ebx,word [eax+0]
547
    movzx ebx,word [eax+0]
551
    shl   ebx,5
548
    shl   ebx,5
552
    add   ebx,window_data
549
    add   ebx,window_data
553
    movzx ecx,word [ebx+4]     ; window y start
550
	mov   ecx, [ebx+WDATA.box.top]     ; window y start
554
    movzx edx,word [eax+8]     ; button y start
551
    movzx edx,word [eax+8]     ; button y start
555
    add   edx,ecx
552
    add   edx,ecx
556
    mov   cx,[0xfb0c]
553
    mov   cx,[0xfb0c]
557
    cmp   edx,ecx
554
    cmp   edx,ecx
Line 603... Line 600...
603
   pusha
600
   pusha
604
  ; mouse x >= button x ?
601
  ; mouse x >= button x ?
605
   movzx ebx,word [eax+0]
602
   movzx ebx,word [eax+0]
606
   shl   ebx,5
603
   shl   ebx,5
607
   add   ebx,window_data
604
   add   ebx,window_data
608
   movzx ecx,word [ebx+0]    ; window x start
605
   mov   ecx, [ebx+WDATA.box.left]    ; window x start
609
   movzx edx,word [eax+4]    ; button x start
606
   movzx edx,word [eax+4]    ; button x start
610
   add   edx,ecx
607
   add   edx,ecx
611
   mov   cx,[0xfb0a]
608
   mov   cx,[0xfb0a]
612
   cmp   edx,ecx
609
   cmp   edx,ecx
613
   jg   no_on_button ;if we release the pointer out of the button area
610
   jg   no_on_button ;if we release the pointer out of the button area
Line 619... Line 616...
619
 
616
 
620
        ; mouse y >= button y ?
617
        ; mouse y >= button y ?
621
   movzx ebx,word [eax+0]
618
   movzx ebx,word [eax+0]
622
   shl   ebx,5
619
   shl   ebx,5
623
   add   ebx,window_data
620
   add   ebx,window_data
624
   movzx ecx,word [ebx+4]    ; window y start
621
   mov   ecx, [ebx+WDATA.box.top]    ; window y start
625
   movzx edx,word [eax+8]    ; button y start
622
   movzx edx,word [eax+8]    ; button y start
626
   add   edx,ecx
623
   add   edx,ecx
627
   mov   cx,[0xfb0c]
624
   mov   cx,[0xfb0c]
628
   cmp   edx,ecx
625
   cmp   edx,ecx