Subversion Repositories Kolibri OS

Rev

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

Rev 2 Rev 28
Line 452... Line 452...
452
    push  edx
452
    push  edx
453
    mov   eax,esi
453
    mov   eax,esi
454
    shl   eax,4
454
    shl   eax,4
455
    add   eax,edi
455
    add   eax,edi
Line -... Line 456...
-
 
456
 
-
 
457
;......................start 1/2 : modified by vhanla .............................
-
 
458
    mov   [buttonid],eax
-
 
459
;......................end   1/2 : modified by vhanla .............................
456
 
460
 
Line 457... Line 461...
457
    ; check that button is at top of windowing stack
461
    ; check that button is at top of windowing stack
458
 
462
 
459
    movzx ebx,word [eax]
463
    movzx ebx,word [eax]
Line 540... Line 544...
540
    popad
544
    popad
Line 541... Line 545...
541
 
545
 
542
    call  negativebutton
546
    call  negativebutton
543
    mov   [0xfff4],byte 0  ; no mouse background
547
    mov   [0xfff4],byte 0  ; no mouse background
-
 
548
    mov   [0xfff5],byte 0  ; draw mouse
-
 
549
;..................................... start 2/2 : modified by vhanla .............................
-
 
550
    ; check coordinates
-
 
551
    jmp afterbuttonid
-
 
552
    buttonid dd 0x0 ;here a will backup the eax value
-
 
553
    afterbuttonid:
-
 
554
 
-
 
555
    pusha
-
 
556
    mov   eax,[buttonid]
-
 
557
                ; mouse x >= button x ?
-
 
558
    movzx ebx,word [eax+0]
-
 
559
    shl   ebx,5
-
 
560
    add   ebx,window_data
-
 
561
    movzx ecx,word [ebx+0]     ; window x start
-
 
562
    movzx edx,word [eax+4]     ; button x start
544
    mov   [0xfff5],byte 0  ; draw mouse
563
    add   edx,ecx
-
 
564
    mov   cx,[0xfb0a]
-
 
565
    cmp   edx,ecx
-
 
566
    jg      no_on_button        ;if we release the pointer out of the button area
-
 
567
 
-
 
568
    movzx ebx,word [eax+6]     ; button x size
-
 
569
    add   edx,ebx
-
 
570
    cmp   ecx,edx
-
 
571
    jg      no_on_button
-
 
572
 
-
 
573
                   ; mouse y >= button y ?
-
 
574
    movzx ebx,word [eax+0]
-
 
575
    shl   ebx,5
-
 
576
    add   ebx,window_data
-
 
577
    movzx ecx,word [ebx+4]     ; window y start
-
 
578
    movzx edx,word [eax+8]     ; button y start
-
 
579
    add   edx,ecx
-
 
580
    mov   cx,[0xfb0c]
-
 
581
    cmp   edx,ecx
-
 
582
    jg      no_on_button
-
 
583
 
-
 
584
    movzx ebx,word [eax+10]    ; button y size
-
 
585
    add   edx,ebx
-
 
586
    cmp   ecx,edx
-
 
587
    jg      no_on_button
-
 
588
    popa
545
    mov   [0xf500],byte 1
589
    mov   [0xf500],byte 1  ; no of buttons in buffer
-
 
590
    pop   ebx
546
    pop   ebx
591
    mov   [0xf501],ebx       ; lets put the button id in buffer
-
 
592
    push  ebx
-
 
593
    pusha
-
 
594
    jmp yes_on_button
-
 
595
no_on_button:
-
 
596
    mov   [0xf500],byte 0  ; no of buttons in buffer
547
    mov   [0xf501],ebx
597
yes_on_button:
-
 
598
    mov   [0xfb44],byte 0  ; mouse down -> do not draw
-
 
599
    popa
548
    mov   [0xfb44],byte 0  ; mouse down checks
600
    pop ebx
549
    popad
601
    popa
-
 
602
    ret