Rev 485 | Rev 1643 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 485 | Rev 1637 | ||
---|---|---|---|
1 | ;------------------------------------------------- |
1 | ;------------------------------------------------- |
2 | ;-----interraction panel with user---------------- |
2 | ;-----interraction panel with user---------------- |
3 | ;------------------------------------------------- |
3 | ;------------------------------------------------- |
4 | panel_interraction: |
4 | panel_interraction: |
5 | ;>>>>>>>>>>>>>>>>>>>>>>>>>> |
5 | ;>>>>>>>>>>>>>>>>>>>>>>>>>> |
6 | mov eax,18 |
6 | mov eax,18 |
7 | mov ebx,14 |
7 | mov ebx,14 |
8 | ;mcall |
8 | ;mcall |
9 | 9 | ||
10 | and [Panel_flag],0 |
10 | and [Panel_flag],0 |
11 | ;collision with text on panel |
11 | ;collision with text on panel |
12 | next_columnus_text: |
12 | next_columnus_text: |
13 | 13 | ||
14 | mov eax,[edi] |
14 | mov eax,[edi] |
15 | mov ebx,[edi+4] |
15 | mov ebx,[edi+4] |
16 | sub eax,10 |
16 | sub eax,10 |
17 | sub ebx,3 |
17 | sub ebx,3 |
18 | mov [Icon_text_x],eax |
18 | mov [Icon_text_x],eax |
19 | mov [Icon_text_y],ebx |
19 | mov [Icon_text_y],ebx |
20 | 20 | ||
21 | mov esi,[edi+8] |
21 | mov esi,[edi+8] |
22 | imul esi,10 |
22 | imul esi,10 |
23 | mov [button_menu_size_x],esi |
23 | mov [button_menu_size_x],esi |
24 | mov [button_menu_size_y],dword 13 |
24 | mov [button_menu_size_y],dword 13 |
25 | 25 | ||
26 | mov esi,[edi+8] |
26 | mov esi,[edi+8] |
27 | add edi,4*3 |
27 | add edi,4*3 |
28 | add edi,esi |
28 | add edi,esi |
29 | 29 | ||
30 | mov ecx,[MouseX] |
30 | mov ecx,[MouseX] |
31 | mov edx,[MouseY] |
31 | mov edx,[MouseY] |
32 | 32 | ||
33 | push edi |
33 | push edi |
34 | mov edi,[button_menu_size_y] |
34 | mov edi,[button_menu_size_y] |
35 | mov esi,[button_menu_size_x] |
35 | mov esi,[button_menu_size_x] |
36 | call columnus |
36 | call columnus |
37 | 37 | ||
38 | pop edi |
38 | pop edi |
39 | mov esi,7 |
39 | mov esi,7 |
40 | 40 | ||
41 | test eax,eax |
41 | test eax,eax |
42 | jz no_columnus_text |
42 | jz no_columnus_text |
43 | 43 | ||
44 | mov esi,1 |
44 | mov esi,1 |
45 | mov [Panel_flag],1 |
45 | mov [Panel_flag],1 |
46 | call GetMouseClick |
46 | call GetMouseClick |
47 | 47 | ||
48 | test eax,eax |
48 | test eax,eax |
49 | jz no_mouse_pressed |
49 | jz no_mouse_pressed |
50 | 50 | ||
51 | mov eax,18 |
51 | mov eax,18 |
52 | mov ebx,14 |
52 | mov ebx,14 |
53 | ;mcall |
53 | ;mcall |
54 | 54 | ||
55 | call print_panel_menu |
55 | call print_panel_menu |
56 | 56 | ||
57 | no_mouse_pressed: |
57 | no_mouse_pressed: |
58 | 58 | ||
59 | no_columnus_text: |
59 | no_columnus_text: |
60 | 60 | ||
61 | mov eax,[Icon_text_x] |
61 | mov eax,[Icon_text_x] |
62 | mov ebx,[Icon_text_y] |
62 | mov ebx,[Icon_text_y] |
63 | mov ecx,[button_menu_size_x] ;------------------------- |
63 | mov ecx,[button_menu_size_x] ;------------------------- |
64 | mov edx,[button_menu_size_y] |
64 | mov edx,[button_menu_size_y] |
65 | call draw_volume_rectangle |
65 | call draw_volume_rectangle |
66 | 66 | ||
67 | push [counter] |
67 | push [counter] |
68 | push edi |
68 | push edi |
69 | mov [counter],7 |
69 | mov [counter],7 |
70 | mov edi,panel_text |
70 | mov edi,panel_text |
71 | call print_panel_text |
71 | call print_panel_text |
72 | 72 | ||
73 | pop edi |
73 | pop edi |
74 | pop [counter] |
74 | pop [counter] |
75 | dec [counter] |
75 | dec [counter] |
76 | jnz next_columnus_text |
76 | jnz next_columnus_text |
77 | 77 | ||
78 | ret |
78 | ret |
79 | ;--------------------------------------------------------- |
79 | ;--------------------------------------------------------- |
80 | ;-----draw panel menu(main engin of panel)---------------- |
80 | ;-----draw panel menu(main engin of panel)---------------- |
81 | ;--------------------------------------------------------- |
81 | ;--------------------------------------------------------- |
82 | print_panel_menu: |
82 | print_panel_menu: |
83 | 83 | ||
84 | 84 | ||
85 | push [counter] |
85 | push [counter] |
86 | ;delit main buttons(some time) |
86 | ;delit main buttons(some time) |
87 | 87 | ||
88 | mov [counter],10 |
88 | mov [counter],10 |
89 | 89 | ||
90 | next_icon_delit1: |
90 | next_icon_delit1: |
91 | 91 | ||
92 | mov eax,8 |
92 | mov eax,8 |
93 | mov edx,[counter] |
93 | mov edx,[counter] |
94 | add edx,11100000000000000000000000000000b |
94 | add edx,11100000000000000000000000000000b |
95 | mcall |
95 | mcall |
96 | inc [counter] |
96 | inc [counter] |
97 | 97 | ||
98 | cmp [counter],30 |
98 | cmp [counter],30 |
99 | jl next_icon_delit1 |
99 | jl next_icon_delit1 |
100 | 100 | ||
101 | ;delit buttons of brushes |
101 | ;delit buttons of brushes |
102 | mov [counter],40 |
102 | mov [counter],40 |
103 | 103 | ||
104 | next_icon_delit2: |
104 | next_icon_delit2: |
105 | 105 | ||
106 | mov eax,8 |
106 | mov eax,8 |
107 | mov edx,[counter] |
107 | mov edx,[counter] |
108 | add edx,11100000000000000000000000000000b |
108 | add edx,11100000000000000000000000000000b |
109 | mcall |
109 | mcall |
110 | inc [counter] |
110 | inc [counter] |
111 | 111 | ||
112 | cmp [counter],45 |
112 | cmp [counter],45 |
113 | jl next_icon_delit2 |
113 | jl next_icon_delit2 |
114 | 114 | ||
115 | ;delit buttons of zoom |
115 | ;delit buttons of zoom |
116 | mov [counter],45 |
116 | mov [counter],45 |
117 | 117 | ||
118 | next_icon_delit3: |
118 | next_icon_delit3: |
119 | 119 | ||
120 | mov eax,8 |
120 | mov eax,8 |
121 | mov edx,[counter] |
121 | mov edx,[counter] |
122 | add edx,11100000000000000000000000000000b |
122 | add edx,11100000000000000000000000000000b |
123 | mcall |
123 | mcall |
124 | inc [counter] |
124 | inc [counter] |
125 | 125 | ||
126 | cmp [counter],50 |
126 | cmp [counter],50 |
127 | jl next_icon_delit3 |
127 | jl next_icon_delit3 |
128 | 128 | ||
129 | ;delit buttons of palette |
129 | ;delit buttons of palette |
130 | mov eax,8 |
130 | mov eax,8 |
131 | mov edx,51 |
131 | mov edx,51 |
132 | add edx,11100000000000000000000000000000b |
132 | add edx,11100000000000000000000000000000b |
133 | mcall |
133 | mcall |
134 | 134 | ||
135 | 135 | ||
136 | ;delit buttons of color |
136 | ;delit buttons of color |
137 | mov eax,8 |
137 | mov eax,8 |
138 | mov edx,52 |
138 | mov edx,52 |
139 | add edx,11100000000000000000000000000000b |
139 | add edx,11100000000000000000000000000000b |
140 | mcall |
140 | mcall |
141 | 141 | ||
142 | pop [counter] |
142 | pop [counter] |
143 | 143 | ||
144 | push esi |
144 | push esi |
145 | mov esi,[counter] |
145 | mov esi,[counter] |
146 | dec esi |
146 | dec esi |
147 | shl esi,4 |
147 | shl esi,4 |
148 | 148 | ||
149 | mov eax,[menu_rectangles+esi] |
149 | mov eax,[menu_rectangles+esi] |
150 | mov ebx,[menu_rectangles+esi+4] |
150 | mov ebx,[menu_rectangles+esi+4] |
151 | mov ecx,[menu_rectangles+esi+8] |
151 | mov ecx,[menu_rectangles+esi+8] |
152 | mov edx,[menu_rectangles+esi+12] |
152 | mov edx,[menu_rectangles+esi+12] |
153 | mov esi,1 |
153 | mov esi,1 |
154 | mov [menu_coordinat_x],eax |
154 | mov [menu_coordinat_x],eax |
155 | mov [menu_size_x],ecx |
155 | mov [menu_size_x],ecx |
156 | call draw_volume_rectangle |
156 | call draw_volume_rectangle |
157 | pop esi |
157 | pop esi |
158 | 158 | ||
159 | calculate_counter_menu: |
159 | calculate_counter_menu: |
160 | 160 | ||
161 | 161 | ||
162 | ;calculate menu counter |
162 | ;calculate menu counter |
163 | mov eax,[counter] |
163 | mov eax,[counter] |
164 | dec eax |
164 | dec eax |
165 | shl eax,2 |
165 | shl eax,2 |
166 | mov ebx,[menu_counters+eax] |
166 | mov ebx,[menu_counters+eax] |
167 | mov [counter_menu],ebx |
167 | mov [counter_menu],ebx |
168 | 168 | ||
169 | call GetMouseCoordinats |
169 | call GetMouseCoordinats |
170 | 170 | ||
171 | and [menu_counter],0 |
171 | and [menu_counter],0 |
172 | push esi |
172 | push esi |
173 | push edi |
173 | push edi |
174 | ;ᣫ ¦¨¢ ¨¥ ¨¬ 樨 >>>>>>>>>>>>>>>>>> |
174 | ;ᣫ ¦¨¢ ¨¥ ¨¬ 樨 >>>>>>>>>>>>>>>>>> |
175 | mov eax,18 |
175 | mov eax,18 |
176 | mov ebx,14 |
176 | mov ebx,14 |
177 | ;mcall |
177 | ;mcall |
178 | 178 | ||
179 | menu_loop: |
179 | menu_loop: |
180 | 180 | ||
181 | mov eax,[menu_coordinat_x] |
181 | mov eax,[menu_coordinat_x] |
182 | mov ebx,36 |
182 | mov ebx,36 |
183 | mov ecx,[MouseX] |
183 | mov ecx,[MouseX] |
184 | mov edx,[MouseY] |
184 | mov edx,[MouseY] |
185 | mov esi,[menu_size_x] |
185 | mov esi,[menu_size_x] |
186 | mov edi,18 |
186 | mov edi,18 |
187 | add ebx,[menu_counter] |
187 | add ebx,[menu_counter] |
188 | add eax,2 |
188 | add eax,2 |
189 | sub esi,3 |
189 | sub esi,3 |
190 | inc ebx |
190 | inc ebx |
191 | call columnus |
191 | call columnus |
192 | mov esi,7 |
192 | mov esi,7 |
193 | 193 | ||
194 | test eax,eax |
194 | test eax,eax |
195 | jz no_columnus_menu_text |
195 | jz no_columnus_menu_text |
196 | 196 | ||
197 | mov esi,1 |
197 | mov esi,1 |
198 | 198 | ||
199 | no_columnus_menu_text: |
199 | no_columnus_menu_text: |
200 | 200 | ||
201 | mov eax,[menu_coordinat_x] |
201 | mov eax,[menu_coordinat_x] |
202 | mov ebx,36 |
202 | mov ebx,36 |
203 | mov ecx,[menu_size_x] |
203 | mov ecx,[menu_size_x] |
204 | mov edx,18 |
204 | mov edx,18 |
205 | add ebx,[menu_counter] |
205 | add ebx,[menu_counter] |
206 | add eax,2 |
206 | add eax,2 |
207 | sub ecx,3 |
207 | sub ecx,3 |
208 | inc ebx |
208 | inc ebx |
209 | call draw_volume_rectangle |
209 | call draw_volume_rectangle |
210 | add [menu_counter],20 |
210 | add [menu_counter],20 |
211 | 211 | ||
212 | 212 | ||
213 | dec [counter_menu] |
213 | dec [counter_menu] |
214 | jnz menu_loop |
214 | jnz menu_loop |
215 | 215 | ||
216 | 216 | ||
217 | ;print menu text |
217 | ;print menu text |
218 | push [counter] |
218 | push [counter] |
219 | mov esi,[counter] |
219 | mov esi,[counter] |
220 | dec esi |
220 | dec esi |
221 | shl esi,2 |
221 | shl esi,2 |
222 | mov edi,[menu_text_en+esi] |
222 | mov edi,[menu_text_en+esi] |
223 | mov eax,[menu_counters+esi] |
223 | mov eax,[menu_counters+esi] |
224 | mov [counter],eax |
224 | mov [counter],eax |
225 | call print_panel_text |
225 | call print_panel_text |
226 | pop [counter] |
226 | pop [counter] |
227 | pop edi |
227 | pop edi |
228 | pop esi |
228 | pop esi |
229 | 229 | ||
230 | 230 | ||
231 | menu_still: |
231 | menu_still: |
232 | 232 | ||
233 | mov eax,10 |
233 | mov eax,10 |
234 | mcall |
234 | mcall |
235 | mov eax,2 |
235 | mov eax,2 |
236 | mcall |
236 | mcall |
237 | mov eax,17 |
237 | mov eax,17 |
238 | mcall |
238 | mcall |
239 | 239 | ||
240 | call GetMouseClick |
240 | call GetMouseClick |
241 | 241 | ||
242 | test eax,eax |
242 | test eax,eax |
243 | jz calculate_counter_menu |
243 | jz calculate_counter_menu |
244 | 244 | ||
245 | call GetMouseCoordinats |
245 | call GetMouseCoordinats |
246 | 246 | ||
247 | ;calculate menu counter |
247 | ;calculate menu counter |
248 | mov eax,[counter] |
248 | mov eax,[counter] |
249 | dec eax |
249 | dec eax |
250 | shl eax,2 |
250 | shl eax,2 |
251 | mov ebx,[menu_counters+eax] |
251 | mov ebx,[menu_counters+eax] |
252 | mov [counter_menu],ebx |
252 | mov [counter_menu],ebx |
253 | 253 | ||
254 | and [menu_counter],0 |
254 | and [menu_counter],0 |
255 | and [counter_11],0 |
255 | and [counter_11],0 |
256 | 256 | ||
257 | push esi |
257 | push esi |
258 | push edi |
258 | push edi |
259 | 259 | ||
260 | menu_loop2: |
260 | menu_loop2: |
261 | 261 | ||
262 | 262 | ||
263 | mov eax,[menu_coordinat_x] |
263 | mov eax,[menu_coordinat_x] |
264 | mov ebx,36 |
264 | mov ebx,36 |
265 | mov ecx,[MouseX] |
265 | mov ecx,[MouseX] |
266 | mov edx,[MouseY] |
266 | mov edx,[MouseY] |
267 | mov esi,[menu_size_x] |
267 | mov esi,[menu_size_x] |
268 | mov edi,18 |
268 | mov edi,18 |
269 | add ebx,[menu_counter] |
269 | add ebx,[menu_counter] |
270 | add eax,2 |
270 | add eax,2 |
271 | sub esi,3 |
271 | sub esi,3 |
272 | inc ebx |
272 | inc ebx |
273 | call columnus |
273 | call columnus |
274 | 274 | ||
275 | inc [counter_11] |
275 | inc [counter_11] |
276 | 276 | ||
277 | test eax,eax |
277 | test eax,eax |
278 | jz no_columnus_menu_text2 |
278 | jz no_columnus_menu_text2 |
279 | 279 | ||
280 | mov esi,[counter_11] |
280 | mov esi,[counter_11] |
281 | mov [number_menu],esi |
281 | mov [number_menu],esi |
282 | 282 | ||
283 | no_columnus_menu_text2: |
283 | no_columnus_menu_text2: |
284 | 284 | ||
285 | add [menu_counter],20 |
285 | add [menu_counter],20 |
286 | 286 | ||
287 | dec [counter_menu] |
287 | dec [counter_menu] |
288 | jnz menu_loop2 |
288 | jnz menu_loop2 |
289 | 289 | ||
290 | pop edi |
290 | pop edi |
291 | pop esi |
291 | pop esi |
292 | 292 | ||
293 | mov eax,5 |
293 | mov eax,5 |
294 | mov ebx,15 |
294 | mov ebx,15 |
295 | mcall |
295 | mcall |
296 | 296 | ||
297 | push [counter] |
297 | push [counter] |
298 | pushad |
298 | pushad |
299 | 299 | ||
300 | call drawwin |
300 | call drawwin |
301 | 301 | ||
302 | popad |
302 | popad |
303 | pop [counter] |
303 | pop [counter] |
304 | 304 | ||
305 | mov eax,[counter] |
305 | mov eax,[counter] |
306 | mov [number_panel],eax |
306 | mov [number_panel],eax |
307 | 307 | ||
308 | call TakeInstruments |
308 | call TakeInstruments |
309 | jmp still |
309 | jmp still |
310 | 310 | ||
311 | ;--------------------------------------------------------- |
311 | ;--------------------------------------------------------- |
312 | ;------print mouse position on panel---------------------- |
312 | ;------print mouse position on panel---------------------- |
313 | ;--------------------------------------------------------- |
313 | ;--------------------------------------------------------- |
314 | PrintMousePos: |
314 | PrintMousePos: |
315 | 315 | ||
316 | pushad |
316 | pushad |
317 | 317 | ||
318 | mov eax,[Window_SizeX] |
318 | mov eax,[Window_SizeX] |
319 | sub eax,75 |
319 | sub eax,75 |
320 | mov ebx,20+15+6 |
320 | mov ebx,20+15+6 |
321 | mov ecx,52 |
321 | mov ecx,52 |
322 | mov edx,18 |
322 | mov edx,18 |
323 | mov esi,4 |
323 | mov esi,4 |
324 | call draw_volume_rectangle |
324 | call draw_volume_rectangle |
325 | 325 | ||
326 | mov eax,[Window_SizeX] |
326 | mov eax,[Window_SizeX] |
327 | sub eax,75 |
327 | sub eax,75 |
328 | mov ebx,20+15+6+18+2 |
328 | mov ebx,20+15+6+18+2 |
329 | mov ecx,52 |
329 | mov ecx,52 |
330 | mov edx,18 |
330 | mov edx,18 |
331 | mov esi,4 |
331 | mov esi,4 |
332 | call draw_volume_rectangle |
332 | call draw_volume_rectangle |
333 | 333 | ||
334 | mov eax,[Window_SizeX] |
334 | mov eax,[Window_SizeX] |
335 | sub eax,70 |
335 | sub eax,70 |
336 | mov ebx,20+15+6+6 |
336 | mov ebx,20+15+6+6 |
337 | and ecx,0 |
337 | and ecx,0 |
338 | mov edx,mouse_pos_x |
338 | mov edx,mouse_pos_x |
339 | mov esi,2 |
339 | mov esi,2 |
340 | call print_text |
340 | call print_text |
341 | 341 | ||
342 | mov eax,[Window_SizeX] |
342 | mov eax,[Window_SizeX] |
343 | sub eax,70 |
343 | sub eax,70 |
344 | mov ebx,20+15+6+6+18+1 |
344 | mov ebx,20+15+6+6+18+1 |
345 | and ecx,0 |
345 | and ecx,0 |
346 | mov edx,mouse_pos_y |
346 | mov edx,mouse_pos_y |
347 | mov esi,2 |
347 | mov esi,2 |
348 | call print_text |
348 | call print_text |
349 | 349 | ||
350 | mov eax,47 |
350 | mov eax,47 |
351 | mov ebx,4*65536 |
351 | mov ebx,4*65536 |
352 | mov ecx,[ScreenX] |
352 | mov ecx,[ScreenX] |
353 | add ecx,[PosX] |
353 | add ecx,[PosX] |
354 | mov edx,[Window_SizeX] |
354 | mov edx,[Window_SizeX] |
355 | sub edx,55 |
355 | sub edx,55 |
356 | shl edx,16 |
356 | shl edx,16 |
357 | add edx,20+15+6+6 |
357 | add edx,20+15+6+6 |
358 | and esi,0 |
358 | and esi,0 |
359 | mcall |
359 | mcall |
360 | 360 | ||
361 | mov eax,47 |
361 | mov eax,47 |
362 | mov ebx,4*65536 |
362 | mov ebx,4*65536 |
363 | mov ecx,[ScreenY] |
363 | mov ecx,[ScreenY] |
364 | add ecx,[PosY] |
364 | add ecx,[PosY] |
365 | mov edx,[Window_SizeX] |
365 | mov edx,[Window_SizeX] |
366 | sub edx,55 |
366 | sub edx,55 |
367 | shl edx,16 |
367 | shl edx,16 |
368 | add edx,20+15+6+18+1+6 |
368 | add edx,20+15+6+18+1+6 |
369 | and esi,0 |
369 | and esi,0 |
370 | mcall |
370 | mcall |
371 | 371 | ||
372 | popad |
372 | popad |
373 | ret |
373 | ret |
374 | ;---------------------------------------------------------- |
374 | ;---------------------------------------------------------- |
375 | ;---------------draw panel in window of program------------ |
375 | ;---------------draw panel in window of program------------ |
376 | ;---------------------------------------------------------- |
376 | ;---------------------------------------------------------- |
377 | draw_panel: |
377 | draw_panel: |
378 | 378 | ||
379 | mov eax,5 |
379 | mov eax,5 |
380 | mov ebx,20 |
380 | mov ebx,20 |
381 | mov ecx,[Window_SizeX] |
381 | mov ecx,[Window_SizeX] |
382 | mov edx,15 |
382 | mov edx,15 |
383 | mov esi,6 |
383 | mov esi,6 |
384 | sub ecx,10 |
384 | sub ecx,10 |
385 | call draw_volume_rectangle |
385 | call draw_volume_rectangle ; top menu - file and etc. |
386 | 386 | ||
387 | ;mov eax,5 |
387 | ;mov eax,5 |
388 | ;mov ebx,20 |
388 | ;mov ebx,20 |
389 | ;mov ecx,[Window_SizeX] |
389 | ;mov ecx,[Window_SizeX] |
390 | ;mov edx,15 |
390 | ;mov edx,15 |
391 | ;mov esi,6 |
391 | ;mov esi,6 |
392 | ;sub ecx,10 |
392 | ;sub ecx,10 |
393 | ;call draw_volume_rectangle |
393 | ;call draw_volume_rectangle |
394 | 394 | ||
395 | mov eax,5 |
395 | mov eax,5 |
396 | mov ebx,20+15+1 |
396 | mov ebx,20+15+1 |
397 | mov ecx,[Window_SizeX] |
397 | mov ecx,[Window_SizeX] |
398 | mov edx,50 |
398 | mov edx,50 |
399 | mov esi,1 |
399 | mov esi,1 |
400 | sub ecx,10 |
400 | sub ecx,10 |
401 | call draw_volume_rectangle |
401 | call draw_volume_rectangle ; tools panel |
402 | 402 | ||
403 | mov eax,5 |
403 | mov eax,5 |
404 | mov ebx,20+15+1+50+1 |
404 | mov ebx,20+15+1+50+1 |
405 | mov ecx,[Window_SizeX] |
405 | mov ecx,[Window_SizeX] |
406 | mov edx,[Window_SizeY] |
406 | mov edx,[Window_SizeY] |
407 | mov esi,1 |
407 | mov esi,1 |
408 | sub ecx,10+20 |
408 | sub ecx,10+20 |
409 | sub edx,20+15+1+50+1+5+20 |
409 | sub edx,20+15+1+50+1+5+20 |
410 | call draw_volume_rectangle |
410 | call draw_volume_rectangle ; picure area |
411 | 411 | ||
412 | mov eax,5 |
412 | mov eax,5 |
413 | mov ebx,[Window_SizeY] |
413 | mov ebx,[Window_SizeY] |
414 | mov ecx,[Window_SizeX] |
414 | mov ecx,[Window_SizeX] |
415 | mov edx,20+10 |
415 | mov edx,20+10 |
416 | mov esi,3 |
416 | mov esi,3 |
417 | sub ecx,30 |
417 | sub ecx,30 |
418 | sub ebx,25+10 |
418 | sub ebx,25+10 |
419 | call draw_volume_rectangle |
419 | call draw_volume_rectangle ; horizontal scrollbar |
420 | 420 | ||
421 | mov eax,[Window_SizeX] |
421 | mov eax,[Window_SizeX] |
422 | mov ebx,20+15+1+49+2 |
422 | mov ebx,20+15+1+49+2 |
423 | mov ecx,20+10 |
423 | mov ecx,20+10 |
424 | mov edx,[Window_SizeY] |
424 | mov edx,[Window_SizeY] |
425 | mov esi,3 |
425 | mov esi,3 |
426 | sub eax,25+10 |
426 | sub eax,25+10 |
427 | sub edx,20+15+1+49+5+20 |
427 | sub edx,20+15+1+49+5+20 |
428 | call draw_volume_rectangle |
428 | call draw_volume_rectangle ; vertical scrollbar |
429 | 429 | ||
430 | mov eax,[Window_SizeX] |
430 | mov eax,[Window_SizeX] |
431 | mov ebx,[Window_SizeY] |
431 | mov ebx,[Window_SizeY] |
432 | mov ecx,20+10 |
432 | mov ecx,20+10 |
433 | mov edx,20+10 |
433 | mov edx,20+10 |
434 | mov esi,6 |
434 | mov esi,6 |
435 | sub eax,25+10 |
435 | sub eax,25+10 |
436 | sub ebx,25+10 |
436 | sub ebx,25+10 |
437 | call draw_volume_rectangle |
437 | call draw_volume_rectangle ; down and right small area |
438 | 438 | ||
439 | ;mov eax,445 |
439 | ;mov eax,445 |
440 | ;mov ebx,20+15+6 |
440 | ;mov ebx,20+15+6 |
441 | ;mov ecx,37 |
441 | ;mov ecx,37 |
442 | ;mov edx,37 |
442 | ;mov edx,37 |
443 | ;mov esi,4 |
443 | ;mov esi,4 |
444 | ;call draw_volume_rectangle |
444 | ;call draw_volume_rectangle |
445 | 445 | ||
446 | ret |
446 | ret |
447 | 447 | ||
448 | 448 | ||
449 | ;---------------------------------------------------------- |
449 | ;---------------------------------------------------------- |
450 | ;----------print text on the panel and menu---------------- |
450 | ;----------print text on the panel and menu---------------- |
451 | ;---------------------------------------------------------- |
451 | ;---------------------------------------------------------- |
452 | print_panel_text: |
452 | print_panel_text: |
453 | next_panel_text: |
453 | next_panel_text: |
454 | 454 | ||
455 | mov eax,[edi] |
455 | mov eax,[edi] |
456 | mov ebx,[edi+4] |
456 | mov ebx,[edi+4] |
457 | ;xor ecx,ecx |
457 | ;xor ecx,ecx |
458 | mov ecx,0x10000000 |
458 | mov ecx,0x10000000 |
459 | mov edx,edi |
459 | mov edx,edi |
460 | add edx,12 |
460 | add edx,12 |
461 | mov esi,[edi+8] |
461 | mov esi,[edi+8] |
462 | add edi,esi |
462 | add edi,esi |
463 | add edi,3*4 |
463 | add edi,3*4 |
464 | 464 | ||
465 | push edi |
465 | push edi |
466 | call print_text |
466 | call print_text |
467 | pop edi |
467 | pop edi |
468 | 468 | ||
469 | dec [counter] |
469 | dec [counter] |
470 | jnz next_panel_text |
470 | jnz next_panel_text |
471 | ret |
471 | ret |
472 | ;---------------------------------------------------------- |
472 | ;---------------------------------------------------------- |
473 | ;------------draw lines of scoll--------------------------- |
473 | ;------------draw lines of scoll--------------------------- |
474 | ;---------------------------------------------------------- |
474 | ;---------------------------------------------------------- |
475 | draw_scrollers: |
475 | draw_scrollers: |
476 | 476 | ||
477 | mov edi,[CounterX] |
477 | mov edi,[CounterX] |
478 | mov eax,[Scroll1CoordinatX] |
478 | mov eax,[Scroll1CoordinatX] |
479 | mov ebx,[Window_SizeY] |
479 | mov ebx,[Window_SizeY] |
480 | sub ebx,22+10 |
480 | sub ebx,22+10 |
481 | mov ecx,[Window_SizeX] |
481 | mov ecx,[Window_SizeX] |
482 | sub ecx,10+5+20+10+1 |
482 | sub ecx,10+5+20+10+1 |
483 | mov edx,14+10 |
483 | mov edx,14+10 |
484 | mov esi,1 |
484 | mov esi,1 |
485 | mov [Scroll1CoordinatX],eax |
485 | mov [Scroll1CoordinatX],eax |
486 | mov [Scroll1CoordinatY],ebx |
486 | mov [Scroll1CoordinatY],ebx |
487 | mov [Scroll1MaxSizeY],edx |
487 | mov [Scroll1MaxSizeY],edx |
488 | mov [Scroll1MaxSizeX],ecx |
488 | mov [Scroll1MaxSizeX],ecx |
489 | imul ecx,edi |
489 | imul ecx,edi |
490 | push eax |
490 | push eax |
491 | push ebx |
491 | push ebx |
492 | push edx |
492 | push edx |
493 | mov eax,ecx |
493 | mov eax,ecx |
494 | mov ebx,[Picture_SizeX] |
494 | mov ebx,[Picture_SizeX] |
495 | cdq |
495 | cdq |
496 | idiv ebx |
496 | idiv ebx |
497 | mov ecx,eax |
497 | mov ecx,eax |
498 | pop edx |
498 | pop edx |
499 | pop ebx |
499 | pop ebx |
500 | pop eax |
500 | pop eax |
501 | mov [Scroll1SizeX],ecx |
501 | mov [Scroll1SizeX],ecx |
502 | mov edi,[Scroll1MaxSizeX] |
502 | mov edi,[Scroll1MaxSizeX] |
503 | sub edi,ecx |
503 | sub edi,ecx |
504 | mov [Scroll1FreeX],edi |
504 | mov [Scroll1FreeX],edi |
505 | call draw_volume_rectangle |
505 | call draw_volume_rectangle |
506 | 506 | ||
507 | mov eax,[Window_SizeX] |
507 | mov eax,[Window_SizeX] |
508 | sub eax,22+10 |
508 | sub eax,22+10 |
509 | mov ebx,[Scroll2CoordinatY] |
509 | mov ebx,[Scroll2CoordinatY] |
510 | mov ecx,14+10 |
510 | mov ecx,14+10 |
511 | mov edx,[Window_SizeY] |
511 | mov edx,[Window_SizeY] |
512 | sub edx,20+15+1+49+10+20+11 |
512 | sub edx,20+15+1+49+10+20+11 |
513 | mov esi,1 |
513 | mov esi,1 |
514 | mov [Scroll2CoordinatX],eax |
514 | mov [Scroll2CoordinatX],eax |
515 | mov [Scroll2CoordinatY],ebx |
515 | mov [Scroll2CoordinatY],ebx |
516 | mov [Scroll2MaxSizeX],ecx |
516 | mov [Scroll2MaxSizeX],ecx |
517 | mov [Scroll2MaxSizeY],edx |
517 | mov [Scroll2MaxSizeY],edx |
518 | 518 | ||
519 | imul edx,[CounterY] |
519 | imul edx,[CounterY] |
520 | push eax |
520 | push eax |
521 | push ebx |
521 | push ebx |
522 | mov eax,edx |
522 | mov eax,edx |
523 | mov ebx,[Picture_SizeY] |
523 | mov ebx,[Picture_SizeY] |
524 | cdq |
524 | cdq |
525 | idiv ebx |
525 | idiv ebx |
526 | mov edx,eax |
526 | mov edx,eax |
527 | pop ebx |
527 | pop ebx |
528 | pop eax |
528 | pop eax |
529 | mov [Scroll2SizeY],edx |
529 | mov [Scroll2SizeY],edx |
530 | mov edi,[Scroll2MaxSizeY] |
530 | mov edi,[Scroll2MaxSizeY] |
531 | sub edi,edx |
531 | sub edi,edx |
532 | mov [Scroll2FreeY],edi |
532 | mov [Scroll2FreeY],edi |
533 | 533 | ||
534 | call draw_volume_rectangle |
534 | call draw_volume_rectangle |
535 | 535 | ||
536 | ret |
536 | ret |
537 | ret |
537 | ret |
538 | 538 | ||
539 | button_menu_size_x dd 0 |
539 | button_menu_size_x dd 0 |
540 | button_menu_size_y dd 0 |
540 | button_menu_size_y dd 0 |