Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 27 → Rev 28

/kernel/trunk/gui/button.inc
454,6 → 454,10
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
call negativebutton
mov [0xfff4],byte 0 ; no mouse background
mov [0xfff5],byte 0 ; draw mouse
mov [0xf500],byte 1
;..................................... 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
mov [0xfb44],byte 0 ; mouse down checks
popad
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 ................................
 
/kernel/trunk/kernel.asm
86,7 → 86,7
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
 
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: