forked from KolibriOS/kolibrios
Click on the application button - works only if during release of a up-button mouse the cursor is on the button application. Realization Victor Alberto Gil Hanla (vhanla).
git-svn-id: svn://kolibrios.org@28 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
84490631f7
commit
afd40cc982
@ -454,6 +454,10 @@ checkbuttons:
|
||||
shl eax,4
|
||||
add eax,edi
|
||||
|
||||
;......................start 1/2 : modified by vhanla .............................
|
||||
mov [buttonid],eax
|
||||
;......................end 1/2 : modified by vhanla .............................
|
||||
|
||||
; check that button is at top of windowing stack
|
||||
|
||||
movzx ebx,word [eax]
|
||||
@ -542,10 +546,59 @@ checkbuttons:
|
||||
call negativebutton
|
||||
mov [0xfff4],byte 0 ; no mouse background
|
||||
mov [0xfff5],byte 0 ; draw mouse
|
||||
mov [0xf500],byte 1
|
||||
pop ebx
|
||||
mov [0xf501],ebx
|
||||
mov [0xfb44],byte 0 ; mouse down checks
|
||||
popad
|
||||
ret
|
||||
;..................................... start 2/2 : modified by vhanla .............................
|
||||
; check coordinates
|
||||
jmp afterbuttonid
|
||||
buttonid dd 0x0 ;here a will backup the eax value
|
||||
afterbuttonid:
|
||||
|
||||
pusha
|
||||
mov eax,[buttonid]
|
||||
; mouse x >= button x ?
|
||||
movzx ebx,word [eax+0]
|
||||
shl ebx,5
|
||||
add ebx,window_data
|
||||
movzx ecx,word [ebx+0] ; window x start
|
||||
movzx edx,word [eax+4] ; button x start
|
||||
add edx,ecx
|
||||
mov cx,[0xfb0a]
|
||||
cmp edx,ecx
|
||||
jg no_on_button ;if we release the pointer out of the button area
|
||||
|
||||
movzx ebx,word [eax+6] ; button x size
|
||||
add edx,ebx
|
||||
cmp ecx,edx
|
||||
jg no_on_button
|
||||
|
||||
; mouse y >= button y ?
|
||||
movzx ebx,word [eax+0]
|
||||
shl ebx,5
|
||||
add ebx,window_data
|
||||
movzx ecx,word [ebx+4] ; window y start
|
||||
movzx edx,word [eax+8] ; button y start
|
||||
add edx,ecx
|
||||
mov cx,[0xfb0c]
|
||||
cmp edx,ecx
|
||||
jg no_on_button
|
||||
|
||||
movzx ebx,word [eax+10] ; button y size
|
||||
add edx,ebx
|
||||
cmp ecx,edx
|
||||
jg no_on_button
|
||||
popa
|
||||
mov [0xf500],byte 1 ; no of buttons in buffer
|
||||
pop ebx
|
||||
mov [0xf501],ebx ; lets put the button id in buffer
|
||||
push ebx
|
||||
pusha
|
||||
jmp yes_on_button
|
||||
no_on_button:
|
||||
mov [0xf500],byte 0 ; no of buttons in buffer
|
||||
yes_on_button:
|
||||
mov [0xfb44],byte 0 ; mouse down -> do not draw
|
||||
popa
|
||||
pop ebx
|
||||
popa
|
||||
ret
|
||||
;..................................... end 2/2 : modified by vhanla ................................
|
||||
|
||||
|
@ -86,7 +86,7 @@ drawbar dd __sys_drawbar
|
||||
putpixel dd __sys_putpixel
|
||||
; } mike.dld
|
||||
|
||||
version db 'Kolibri OS version 0.5.1.5 ',13,10,13,10,0
|
||||
version db 'Kolibri OS version 0.5.2.1 ',13,10,13,10,0
|
||||
;dd endofcode-0x10000
|
||||
|
||||
;db 'Boot02'
|
||||
@ -2253,7 +2253,7 @@ keyboard_mode_sys db 0
|
||||
|
||||
iglobal
|
||||
version_inf:
|
||||
db 0,5,1,5 ; version 0.5.1.5
|
||||
db 0,5,2,1 ; version 0.5.2.1
|
||||
db UID_KOLIBRI
|
||||
db 'Kolibri',0
|
||||
version_end:
|
||||
|
Loading…
Reference in New Issue
Block a user