Subversion Repositories Kolibri OS

Rev

Rev 3840 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3840 Rev 5951
1
;------------------------------------------------------------------------------
1
;------------------------------------------------------------------------------
2
confirmation_action:
2
confirmation_action:
3
	mov	[work_confirmation],0
3
	mov	[work_confirmation],0
4
	mov	[work_confirmation_yes],0
4
	mov	[work_confirmation_yes],0
5
	jmp	.red
5
	jmp	.red
6
;--------------------------------------
6
;--------------------------------------
7
.red_1:
7
.red_1:
8
	call	draw_window
8
	call	draw_window
9
;--------------------------------------
9
;--------------------------------------
10
.red:
10
.red:
11
	call	draw_confirmation_button
11
	call	draw_confirmation_button
12
	call	draw_confirmation_menu
12
	call	draw_confirmation_menu
13
;--------------------------------------
13
;--------------------------------------
14
.still:
14
.still:
15
	mcall	10
15
	mcall	10
16
	cmp	eax,1
16
	cmp	eax,1
17
	je	.red_1
17
	je	.red_1
18
 
18
 
19
	cmp	eax,2
19
	cmp	eax,2
20
	je	key_menu_confirmation
20
	je	key_menu_confirmation
21
 
21
 
22
	cmp	eax,3
22
	cmp	eax,3
23
	jne	.still
23
	jne	.still
24
 
24
 
25
	mcall	17
25
	mcall	17
26
	cmp	ah,161
26
	cmp	ah,161
27
	je	.no_del
27
	je	.no_del
28
 
28
 
29
	cmp	ah,160
29
	cmp	ah,160
30
	je	.del
30
	je	.del
31
 
31
 
32
	cmp	ah,1
32
	cmp	ah,1
33
	jne	.still
33
	jne	.still
34
 
34
 
35
	mcall	-1
35
	mcall	-1
36
;--------------------------------------
36
;--------------------------------------
37
.del:
37
.del:
38
	mov	[work_confirmation_yes],1
38
	mov	[work_confirmation_yes],1
39
;--------------------------------------
39
;--------------------------------------
40
.no_del:
40
.no_del:
41
	call	draw_window
41
	call	draw_window
42
;--------------------------------------
42
;--------------------------------------
43
.ret:
43
.ret:
44
	ret
44
	ret
45
;------------------------------------------------------------------------------
45
;------------------------------------------------------------------------------
46
draw_confirmation_button:
46
draw_confirmation_button:
47
	mov	ecx,[window_high]
47
	mov	ecx,[window_high]
48
	mov	ebx,[window_width]
48
	mov	ebx,[window_width]
49
	shr	ecx,1
49
	shr	ecx,1
50
	shr	ebx,1
50
	shr	ebx,1
51
	sub	ebx,45
51
	sub	ebx,45
52
	shl	ecx,16
52
	shl	ecx,16
53
	shl	ebx,16
53
	shl	ebx,16
54
	mov	cx,15
54
	mov	cx,15
55
	mov	bx,40
55
	mov	bx,40
56
	mcall	8,,,0x40000000+160,0xffffff
56
	mcall	8,,,0x40000000+160,0xffffff
57
	add	ebx,50 shl 16
57
	add	ebx,50 shl 16
58
	inc	edx
58
	inc	edx
59
	mcall
59
	mcall
60
	ret
60
	ret
61
;------------------------------------------------------------------------------
61
;------------------------------------------------------------------------------
62
draw_confirmation_menu:
62
draw_confirmation_menu:
63
	mov	ecx,[window_high]
63
	mov	ecx,[window_high]
64
	mov	ebx,[window_width]
64
	mov	ebx,[window_width]
65
	shr	ecx,1
65
	shr	ecx,1
66
	shr	ebx,1
66
	shr	ebx,1
67
	sub	ecx,22
67
	sub	ecx,22
68
	sub	ebx,60
68
	sub	ebx,60
69
	shl	ecx,16
69
	shl	ecx,16
70
	shl	ebx,16
70
	shl	ebx,16
71
	mov	cx,44
71
	mov	cx,44
72
	mov	bx,120
72
	mov	bx,120
73
	mcall	13,,,0x6060ff
73
	mcall	13,,,0x6060ff
74
	push	ebx ecx
74
	push	ebx ecx
75
	add	ebx,15 shl 16
75
	add	ebx,15 shl 16
76
	add	ecx,22 shl 16
76
	add	ecx,22 shl 16
77
	mov	bx,40
77
	mov	bx,40
78
	mov	cx,15
78
	mov	cx,15
79
	mov	edx,0
79
	mov	edx,0
80
	push	ebx ecx
80
	push	ebx ecx
81
	cmp	[work_confirmation],0
81
	cmp	[work_confirmation],0
82
	jne	@f
82
	jne	@f
83
 
83
 
84
	add	ebx,50 shl 16
84
	add	ebx,50 shl 16
85
;--------------------------------------
85
;--------------------------------------
86
@@:
86
@@:
87
	mcall
87
	mcall
88
	add	ecx,1 shl 16
88
	add	ecx,1 shl 16
89
	add	ebx,1 shl 16
89
	add	ebx,1 shl 16
90
	mov	bx,38
90
	mov	bx,38
91
	mov	cx,13
91
	mov	cx,13
92
	mcall	,,,0x6060ff
92
	mcall	,,,0x6060ff
93
	pop	ecx ebx
93
	pop	ecx ebx
94
	mov	edx,0xff0000
94
	mov	edx,0xff0000
95
	cmp	[work_confirmation],0
95
	cmp	[work_confirmation],0
96
	je	@f
96
	je	@f
97
 
97
 
98
	add	ebx,50 shl 16
98
	add	ebx,50 shl 16
99
	mov	edx,0xaa00
99
	mov	edx,0xaa00
100
;--------------------------------------
100
;--------------------------------------
101
@@:
101
@@:
102
	mcall
102
	mcall
103
	pop	ecx	ebx
103
	pop	ecx	ebx
104
	shr	ecx,16
104
	shr	ecx,16
105
	mov	bx,cx
105
	mov	bx,cx
106
	add	ebx,15 shl 16+5
106
	add	ebx,7 shl 16+2
107
	mcall	4,,0x90ffffff,[confirmation_type]
107
	mcall	4,,0x90ffffff,[confirmation_type]
108
	add	ebx,7 shl 16+20
108
	add	ebx,15 shl 16+20
109
	mcall	,,,type_yes
109
	mcall	,,,type_yes
110
	add	ebx,56 shl 16
110
	add	ebx,56 shl 16
111
	mcall	,,,type_no
111
	mcall	,,,type_no
112
	ret
112
	ret
113
;------------------------------------------------------------------------------
113
;------------------------------------------------------------------------------
114
key_menu_confirmation:
114
key_menu_confirmation:
115
	mcall	2
115
	mcall	2
116
	cmp	[extended_key],1
116
	cmp	[extended_key],1
117
	je	.extended_key
117
	je	.extended_key
118
 
118
 
119
	test	al,al
119
	test	al,al
120
	jnz	.end_1
120
	jnz	.end_1
121
 
121
 
122
	cmp	ah,0xE0
122
	cmp	ah,0xE0
123
	jne	@f
123
	jne	@f
124
;--------------------------------------
124
;--------------------------------------
125
.end_1:
125
.end_1:
126
	jmp	confirmation_action.still
126
	jmp	confirmation_action.still
127
;--------------------------------------
127
;--------------------------------------
128
@@:
128
@@:
129
	cmp	ah,75
129
	cmp	ah,75
130
	je	confirmation_key_75.1
130
	je	confirmation_key_75.1
131
 
131
 
132
	cmp	ah,77
132
	cmp	ah,77
133
	je	confirmation_key_75.1
133
	je	confirmation_key_75.1
134
 
134
 
135
	cmp	ah,28
135
	cmp	ah,28
136
	je	confirmation_key_28.1
136
	je	confirmation_key_28.1
137
;--------------------------------------
137
;--------------------------------------
138
.end:
138
.end:
139
	cmp	ah,1
139
	cmp	ah,1
140
	jne	confirmation_action.still
140
	jne	confirmation_action.still
141
 
141
 
142
	ret
142
	ret
143
;------------------------------------------------------------------------------
143
;------------------------------------------------------------------------------
144
.extended_key:
144
.extended_key:
145
	mov	[extended_key],0
145
	mov	[extended_key],0
146
;------------------------------------------------------------------------------
146
;------------------------------------------------------------------------------
147
confirmation_key_75:
147
confirmation_key_75:
148
	cmp	ah,75	; arrow left
148
	cmp	ah,75	; arrow left
149
	je	.1
149
	je	.1
150
 
150
 
151
	cmp	ah,77	; arrow right
151
	cmp	ah,77	; arrow right
152
	jne	confirmation_key_28
152
	jne	confirmation_key_28
153
;--------------------------------------
153
;--------------------------------------
154
.1:
154
.1:
155
	dec	[work_confirmation]
155
	dec	[work_confirmation]
156
	and	[work_confirmation],1
156
	and	[work_confirmation],1
157
	jmp	confirmation_action.red
157
	jmp	confirmation_action.red
158
;------------------------------------------------------------------------------
158
;------------------------------------------------------------------------------
159
confirmation_key_28:
159
confirmation_key_28:
160
	cmp	ah,28	; Enter
160
	cmp	ah,28	; Enter
161
	jne	confirmation_action.still
161
	jne	confirmation_action.still
162
;--------------------------------------
162
;--------------------------------------
163
.1:
163
.1:
164
	cmp	[work_confirmation],0
164
	cmp	[work_confirmation],0
165
	jne	@f
165
	jne	@f
166
 
166
 
167
	mov	[work_confirmation_yes],1
167
	mov	[work_confirmation_yes],1
168
;--------------------------------------
168
;--------------------------------------
169
@@:
169
@@:
170
	ret
170
	ret
171
;------------------------------------------------------------------------------
171
;------------------------------------------------------------------------------