1 ;---------------------------------------------------------------------
\r
3 test dword [status],8
\r
7 call get_memory_for_thread_stack
\r
8 mov [thread_stack_4],eax
\r
9 mcall 51,1,thread4 ;, thread_stack_4
\r
11 ;---------------------------------------------------------------------
\r
12 thread4: ; start of bgrd thread
\r
13 mcall 9, procinfo_threads, -1
\r
20 mov eax,10 ; wait here for event
\r
23 cmp eax,1 ; redraw request ?
\r
26 cmp eax,2 ; key in buffer ?
\r
29 cmp eax,3 ; button in buffer ?
\r
32 cmp eax,6 ; mouse in buffer ?
\r
36 ;---------------------------------------------------------------------
\r
38 mov eax,option_group1
\r
40 push dword option_boxes_bcgr
\r
41 call [option_box_mouse]
\r
43 je .option_boxes_SCC
\r
49 jmp .option_group1_color_set
\r
50 ;---------------------------------------------------------------------
\r
55 jmp .option_group1_color_set
\r
56 ;---------------------------------------------------------------------
\r
61 jmp .option_group1_color_set
\r
62 ;---------------------------------------------------------------------
\r
65 jne .option_boxes_SCC
\r
67 .option_group1_color_set:
\r
68 mov [bcgr_group_pointer],0
\r
69 call .option_boxes_redraw
\r
71 ;---------------------------------------------------------------------
\r
73 mov eax,[option_group3]
\r
74 push dword option_boxes_SCC
\r
75 call [option_box_mouse]
\r
76 cmp eax,[option_group3]
\r
80 mov [bcgr_group_pointer],1
\r
81 call .option_boxes_redraw
\r
83 ;---------------------------------------------------------------------
\r
85 mov al,[bcgr_group_pointer]
\r
88 mov [bcgr_group_pointer],al
\r
89 call .option_boxes_redraw
\r
91 ;---------------------------------------------------------------------
\r
103 cmp [bcgr_group_pointer],1
\r
104 je .key_option_group3
\r
105 ;---------------------------------------------------------------------
\r
106 .key_option_group1:
\r
117 ;--------------------------------------
\r
127 mov eax,option_group1
\r
131 mov [eax],dword op1
\r
132 call .draw_opt_boxes_bcgr
\r
134 ;---------------------------------------
\r
139 mov [eax],dword op2
\r
140 call .draw_opt_boxes_bcgr
\r
142 ;----------------------------------------
\r
147 mov [eax],dword op3
\r
148 call .draw_opt_boxes_bcgr
\r
150 ;-----------------------------------------
\r
152 mov [eax],dword op4
\r
153 call .draw_opt_boxes_bcgr
\r
155 ;---------------------------------------------------------------------
\r
156 .key_option_group3:
\r
166 ;------------------------------------------
\r
173 ;------------------------------------------
\r
180 ;------------------------------------------
\r
186 ;------------------------------------------
\r
189 call .convert_1 ;for additional check
\r
190 call .draw_opt_boxes_SCC
\r
192 ;---------------------------------------------------------------------
\r
194 mov eax,option_group3
\r
195 mov ebx,Stretch_Crop_Corner
\r
196 cmp [eax],dword op_UL
\r
198 mov [ebx],dword 0 shl 16+0
\r
199 jmp .option_group3_color_set
\r
200 ;----------------------------------------
\r
202 cmp [eax],dword op_UC
\r
204 mov [ebx],dword 0 shl 16+1
\r
205 jmp .option_group3_color_set
\r
206 ;-----------------------------------------
\r
208 cmp [eax],dword op_UR
\r
210 mov [ebx],dword 0 shl 16+2
\r
211 jmp .option_group3_color_set
\r
212 ;-----------------------------------------
\r
214 cmp [eax],dword op_CL
\r
216 mov [ebx],dword 1 shl 16+0
\r
217 jmp .option_group3_color_set
\r
218 ;------------------------------------------
\r
220 cmp [eax],dword op_CC
\r
222 mov [ebx],dword 1 shl 16+1
\r
223 jmp .option_group3_color_set
\r
224 ;-------------------------------------------
\r
226 cmp [eax],dword op_CR
\r
228 mov [ebx],dword 1 shl 16+2
\r
229 jmp .option_group3_color_set
\r
230 ;--------------------------------------------
\r
232 cmp [eax],dword op_DL
\r
234 mov [ebx],dword 2 shl 16+0
\r
235 jmp .option_group3_color_set
\r
236 ;--------------------------------------------
\r
238 cmp [eax],dword op_DC
\r
240 mov [ebx],dword 2 shl 16+1
\r
241 jmp .option_group3_color_set
\r
242 ;--------------------------------------------
\r
244 cmp [eax],dword op_DR
\r
245 jne .option_group3_color_set
\r
246 mov [ebx],dword 2 shl 16+2
\r
247 .option_group3_color_set:
\r
249 ;---------------------------------------------------------------------
\r
251 mov eax,Stretch_Crop_Corner
\r
252 mov ebx,option_group3
\r
253 cmp [eax],dword 0 shl 16+0
\r
255 mov [ebx],dword op_UL
\r
256 jmp .Stretch_Crop_Corner_set
\r
257 ;----------------------------------------
\r
259 cmp [eax],dword 0 shl 16+1
\r
261 mov [ebx],dword op_UC
\r
262 jmp .Stretch_Crop_Corner_set
\r
263 ;-----------------------------------------
\r
265 cmp [eax],dword 0 shl 16+2
\r
267 mov [ebx],dword op_UR
\r
268 jmp .Stretch_Crop_Corner_set
\r
269 ;-----------------------------------------
\r
271 cmp [eax],dword 1 shl 16+0
\r
273 mov [ebx],dword op_CL
\r
274 jmp .Stretch_Crop_Corner_set
\r
275 ;------------------------------------------
\r
277 cmp [eax],dword 1 shl 16+1
\r
279 mov [ebx],dword op_CC
\r
280 jmp .Stretch_Crop_Corner_set
\r
281 ;-------------------------------------------
\r
283 cmp [eax],dword 1 shl 16+2
\r
285 mov [ebx],dword op_CR
\r
286 jmp .Stretch_Crop_Corner_set
\r
287 ;--------------------------------------------
\r
289 cmp [eax],dword 2 shl 16+0
\r
291 mov [ebx],dword op_DL
\r
292 jmp .Stretch_Crop_Corner_set
\r
293 ;--------------------------------------------
\r
295 cmp [eax],dword 2 shl 16+1
\r
297 mov [ebx],dword op_DC
\r
298 jmp .Stretch_Crop_Corner_set
\r
299 ;--------------------------------------------
\r
301 cmp [eax],dword 2 shl 16+2
\r
302 jne .Stretch_Crop_Corner_set
\r
303 mov [ebx],dword op_DR
\r
304 .Stretch_Crop_Corner_set:
\r
306 ;---------------------------------------------------------------------
\r
313 je .start_ColorDialog
\r
314 ; cmp ah,1 ; button id=1 ?
\r
317 xor dword [status],8
\r
321 mcall 68,13,[thread_stack_4]
\r
322 mov eax,-1 ; close this program
\r
328 ;---------------------------------------------------------------------
\r
329 .start_ColorDialog:
\r
330 push dword ColorDialog_data
\r
331 call [ColorDialog_Start]
\r
332 call clear_control_key_flag
\r
333 ; 2 - use another method/not found program
\r
334 cmp [ColorDialog_data.status],2
\r
336 ; 1 - OK, color selected
\r
337 cmp [ColorDialog_data.status],1
\r
340 mov eax,[ColorDialog_data.color]
\r
341 mov [background_color],eax
\r
343 ;---------------------------------------------------------------------
\r
344 ; *********************************************
\r
345 ; ******* WINDOW DEFINITIONS AND DRAW ********
\r
346 ; *********************************************
\r
351 mcall ,<100,300>,<100,170>,0x13909090,,labelt4
\r
352 mcall 8,<60,40>,<120,20>,4,0xdddddd
\r
353 mcall ,<220,40>,<120,20>,5,[background_color] ; 0xdddddd
\r
354 mcall 4,<36,28>,0xffffff,bgrdtext,bgrdtext.size
\r
357 mcall ,,,scc_text,scc_text.size
\r
359 add ebx,40*65536+98
\r
361 mcall ,,,ok_btn,ok_btn.size
\r
363 mcall ,,0xffffff,color_btn,color_btn.size
\r
364 call .option_boxes_redraw
\r
365 ; mcall 47,0x80000,[PID4],<200, 5>,0xffffff
\r
368 ;---------------------------------------------------------------------
\r
369 .option_boxes_redraw:
\r
370 call .draw_opt_boxes_bcgr
\r
371 call .draw_opt_boxes_SCC
\r
373 ;---------------------------------------------------------------------
\r
374 .draw_opt_boxes_bcgr:
\r
376 cmp [bcgr_group_pointer],0
\r
381 mcall 13,<59,14>,<44,59>,
\r
382 push dword option_boxes_bcgr
\r
383 call [option_box_draw]
\r
385 ;---------------------------------------------------------------------
\r
386 .draw_opt_boxes_SCC:
\r
388 cmp [bcgr_group_pointer],1
\r
393 mcall 13,<198,70>,<38,70>,
\r
394 push dword option_boxes_SCC
\r
395 call [option_box_draw]
\r