Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1792 → Rev 4314

/programs/fs/kfm/trunk/confirm.inc
1,36 → 1,48
;---------------------------------------------------------------------
;------------------------------------------------------------------------------
confirmation_action:
mov [work_confirmation],0
mov [work_confirmation_yes],0
jmp .red
;--------------------------------------
.red_1:
call draw_window
;--------------------------------------
.red:
call draw_confirmation_button
call draw_confirmation_menu
;--------------------------------------
.still:
mcall 10
cmp eax,1
je .red_1
 
cmp eax,2
je key_menu_confirmation
 
cmp eax,3
jne .still
 
mcall 17
cmp ah,161
je .no_del
 
cmp ah,160
je .del
 
cmp ah,1
jne .still
 
mcall -1
;--------------------------------------
.del:
mov [work_confirmation_yes],1
;--------------------------------------
.no_del:
call draw_window
;--------------------------------------
.ret:
ret
;---------------------------------------------------------------------
;------------------------------------------------------------------------------
draw_confirmation_button:
mov ecx,[window_high]
mov ebx,[window_width]
41,15 → 53,12
shl ebx,16
mov cx,15
mov bx,40
mov esi,0xffffff
mov edx,0x40000000+160
mov eax,8
int 0x40
mcall 8,,,0x40000000+160,0xffffff
add ebx,50 shl 16
inc edx
int 0x40
mcall
ret
;---------------------------------------------------------------------
;------------------------------------------------------------------------------
draw_confirmation_menu:
mov ecx,[window_high]
mov ebx,[window_width]
61,7 → 70,7
shl ebx,16
mov cx,44
mov bx,120
mcall 13, , ,0x6060ff ;0xff
mcall 13,,,0x6060ff
push ebx ecx
add ebx,15 shl 16
add ecx,22 shl 16
71,23 → 80,26
push ebx ecx
cmp [work_confirmation],0
jne @f
 
add ebx,50 shl 16
;--------------------------------------
@@:
int 0x40
mcall
add ecx,1 shl 16
add ebx,1 shl 16
mov bx,38
mov cx,13
mov edx,0x6060ff
int 0x40
mcall ,,,0x6060ff
pop ecx ebx
mov edx,0xff0000
cmp [work_confirmation],0
je @f
 
add ebx,50 shl 16
mov edx,0xaa00
;--------------------------------------
@@:
int 0x40
mcall
pop ecx ebx
shr ecx,16
mov bx,cx
94,53 → 106,66
add ebx,15 shl 16+5
mcall 4, ,0x90ffffff,[confirmation_type]
add ebx,7 shl 16+20
mov edx,type_yes
int 0x40
mcall ,,,type_yes
add ebx,56 shl 16
mov edx,type_no
int 0x40
mcall ,,,type_no
ret
;---------------------------------------------------------------------
;------------------------------------------------------------------------------
key_menu_confirmation:
mcall 2
cmp [extended_key],1
je .extended_key
 
test al, al
jnz .end_1
 
cmp ah, 0xE0
jne @f
;--------------------------------------
.end_1:
jmp confirmation_action.still
;--------------------------------------
@@:
cmp ah,75
je confirmation_key_75.1
 
cmp ah,77
je confirmation_key_75.1
 
cmp ah,28
je confirmation_key_28.1
;--------------------------------------
.end:
cmp ah,1
jne confirmation_action.still
 
ret
;---------------------------------------------------------------------
;------------------------------------------------------------------------------
.extended_key:
mov [extended_key],0
;------------------------------------------------------------------------------
confirmation_key_75:
cmp ah,75 ;arrow left
je .1
 
cmp ah,77 ; arrow right
jne confirmation_key_28
;--------------------------------------
.1:
dec [work_confirmation]
and [work_confirmation],1
jmp confirmation_action.red
;------------------------------------------------------------------------------
confirmation_key_28:
cmp ah,28 ; Enter
jne confirmation_action.still
;--------------------------------------
.1:
cmp [work_confirmation],0
jne @f
 
mov [work_confirmation_yes],1
;--------------------------------------
@@:
ret
;---------------------------------------------------------------------
;------------------------------------------------------------------------------