1 ;---------------------------------------------------------------------
\r
3 test dword [status],16
\r
7 call get_memory_for_thread_stack
\r
8 mov [thread_stack_5],eax
\r
9 mcall 51,1,thread5 ; thread_stack_5
\r
11 ;---------------------------------------------------------------------
\r
12 thread5: ; start of bgrd thread
\r
13 mcall 9,procinfo_threads,-1
\r
18 cmp [sort_type],dword 0
\r
21 mov [option_group2],sort0
\r
23 ;---------------------------------------------------------------------
\r
25 cmp [sort_type],dword 2
\r
28 mov [option_group2],sort2
\r
30 ;---------------------------------------------------------------------
\r
32 cmp [sort_type],dword 4
\r
35 mov [option_group2],sort4
\r
37 ;---------------------------------------------------------------------
\r
39 mov [option_group2],sort6
\r
40 ;-----------------------------------
\r
42 mov [sort_type_old],eax
\r
43 mov eax,[option_group2]
\r
44 mov [option_group2_old],eax
\r
45 ;-----------------------------------
\r
48 ;-----------------------------------
\r
50 mcall 10 ; wait here for event
\r
52 cmp eax,1 ; redraw request ?
\r
55 cmp eax,2 ; key in buffer ?
\r
58 cmp eax,3 ; button in buffer ?
\r
61 cmp eax,6 ; mouse in buffer ?
\r
65 ;---------------------------------------------------------------------
\r
67 push dword option_boxes_sort
\r
68 call [option_box_mouse]
\r
70 cmp [option_group2],sort0
\r
73 mov [sort_type],dword 0
\r
75 ;---------------------------------------------------------------------
\r
77 cmp [option_group2],sort2
\r
80 mov [sort_type],dword 2
\r
82 ;---------------------------------------------------------------------
\r
84 cmp [option_group2],sort4
\r
87 mov [sort_type],dword 4
\r
89 ;---------------------------------------------------------------------
\r
91 cmp [option_group2],sort6
\r
94 mov [sort_type],dword 6
\r
96 ;---------------------------------------------------------------------
\r
116 ;---------------------------------------------------------------------
\r
124 cmp [sort_type],dword 0
\r
127 mov [option_group2],sort0
\r
128 call .draw_opt_boxes
\r
130 ;---------------------------------------------------------------------
\r
132 cmp [sort_type],dword 2
\r
135 mov [option_group2],sort2
\r
136 call .draw_opt_boxes
\r
138 ;---------------------------------------------------------------------
\r
140 cmp [sort_type],dword 4
\r
143 mov [option_group2],sort4
\r
144 call .draw_opt_boxes
\r
146 ;---------------------------------------------------------------------
\r
148 cmp [sort_type],dword 6
\r
151 mov [option_group2],sort6
\r
152 call .draw_opt_boxes
\r
154 ;---------------------------------------------------------------------
\r
157 cmp ah,1 ; button id=1 ?
\r
159 ;-------------------------------
\r
161 mov eax,[sort_type_old]
\r
162 mov [sort_type],eax
\r
163 mov eax,[option_group2_old]
\r
164 mov [option_group2],eax
\r
166 xor dword [status],16
\r
169 mcall 68,13,[thread_stack_5]
\r
170 mcall -1 ; close this program
\r
171 ;---------------------------------------------------------------------
\r
174 mov eax,[load_directory_pointer]
\r
175 cmp [eax+4],dword 0
\r
178 call load_directory.copy_dir_path
\r
179 call load_directory.sort
\r
180 mov [sort_directory_flag],byte 1
\r
182 ;---------------------------------------------------------------------
\r
183 ; *********************************************
\r
184 ; ******** WINDOW DEFINITIONS AND DRAW ********
\r
185 ; *********************************************
\r
188 xor eax,eax ; function 0 : define and draw window
\r
190 mcall ,<100,300>,<100,110>,0x13909090,,labelt5
\r
191 mcall 8,<120,40>,<50,20>,4,0xdddddd
\r
192 mcall 4,<46,28>,0xffffff,sorttext,sorttext.size
\r
194 mcall ,<135,57>,,ok_btn,ok_btn.size
\r
195 call .draw_opt_boxes
\r
196 ; mcall 47,0x80000,[PID5],<200, 5>,0xffffff
\r
199 ;---------------------------------------------------------------------
\r
201 push dword option_boxes_sort
\r
202 call [option_box_draw]
\r
204 ;---------------------------------------------------------------------
\r