Rev 6218 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5872 | pathoswith | 1 | |
2 | pusha |
||
2619 | mario79 | 3 | call draw_tray_buttons |
4 | call draw_time_skin |
||
5 | call draw_time |
||
6 | mov [draw_flag_certainly],1 |
||
7 | call draw_flag ; language |
||
5872 | pathoswith | 8 | call draw_list_button |
2619 | mario79 | 9 | popa |
10 | ret |
||
11 | ;--------------------------------------------------------------- |
||
5872 | pathoswith | 12 | draw_tray_buttons: |
2619 | mario79 | 13 | mov [offset_x_tray],0 |
14 | cmp [minimize_right],dword 0 |
||
15 | je @f |
||
16 | add [offset_x_tray],MR_SIZE |
||
17 | @@: |
||
18 | mov ecx,[height] |
||
4031 | heavyiron | 19 | mov esi,[wcolor] |
2619 | mario79 | 20 | mov eax,8 |
21 | cmp [clock_enable],dword 0 |
||
22 | je @f |
||
23 | add [offset_x_tray],CLOCK_SIZE |
||
24 | mov ebx,[max_x] |
||
25 | sub ebx,[offset_x_tray] |
||
26 | shl ebx,16 |
||
27 | add ebx,CLOCK_SIZE+1 |
||
4031 | heavyiron | 28 | mcall ,,,0x60000000+2 ; time/date button |
5872 | pathoswith | 29 | sub ebx,3 |
30 | mov [pos_x_clock],ebx |
||
2619 | mario79 | 31 | @@: |
32 | cmp [cpu_usage_enable],dword 0 |
||
33 | je @f |
||
34 | add [offset_x_tray],CPU_USAGE_SIZE |
||
35 | mov ebx,[max_x] |
||
36 | sub ebx,[offset_x_tray] |
||
37 | shl ebx,16 |
||
38 | add ebx,CPU_USAGE_SIZE+1 |
||
4031 | heavyiron | 39 | mcall ,,,0x60000000+18 ;button 18 - sysmeter_name (GMON) |
40 | sub ebx,3 |
||
5872 | pathoswith | 41 | mov [pos_x_cpu_usage],ebx |
2619 | mario79 | 42 | @@: |
43 | cmp [chlang_enable],dword 0 |
||
44 | je @f |
||
45 | add [offset_x_tray],CHLANG_SIZE |
||
46 | mov ebx,[max_x] |
||
47 | sub ebx,[offset_x_tray] |
||
48 | shl ebx,16 |
||
49 | add ebx,CHLANG_SIZE+1 |
||
4031 | heavyiron | 50 | mcall ,,,0x60000000+16 ;button 16 - chang language |
51 | sub ebx,3 |
||
5872 | pathoswith | 52 | mov [pos_x_cpu_chlang],ebx |
2619 | mario79 | 53 | @@: |
54 | cmp [page_list_enable],dword 0 |
||
55 | je @f |
||
56 | add [offset_x_tray],PAGE_LIST_SIZE |
||
57 | mov ebx,[max_x] |
||
58 | sub ebx,[offset_x_tray] |
||
59 | shl ebx,16 |
||
60 | add ebx,10 |
||
61 | mov [pos_x_page_list],ebx |
||
62 | mcall ,,,0x60000000+22 ;button 22 - page list decrease |
||
4031 | heavyiron | 63 | |
5872 | pathoswith | 64 | |
2619 | mario79 | 65 | mcall ,,,0x60000000+21 ;button 21 - page list decrease |
4031 | heavyiron | 66 | @@: |
2619 | mario79 | 67 | ret |
68 | ;--------------------------------------------------------------- |
||
5872 | pathoswith | 69 | draw_time_skin: |
2619 | mario79 | 70 | cmp [clock_enable],dword 0 |
71 | je @b |
||
5872 | pathoswith | 72 | mov ebx,[pos_x_clock] |
2619 | mario79 | 73 | call calculate_button_y_coordinate_and_size |
74 | |||
5872 | pathoswith | 75 | |
2619 | mario79 | 76 | mov esi,[wcolor] |
77 | jmp draw_appl_button |
||
5872 | pathoswith | 78 | ;--------------------------------------------------------------- |
79 | draw_time: |
||
2619 | mario79 | 80 | cmp [clock_enable],dword 0 |
81 | je @b |
||
5872 | pathoswith | 82 | mcall 3 |
2619 | mario79 | 83 | cmp eax,[ptime] |
84 | jz @b |
||
5872 | pathoswith | 85 | mov [ptime],eax |
86 | |||
2619 | mario79 | 87 | |
88 | movzx ebx,al |
||
89 | shr eax,8 |
||
90 | movzx ecx,al |
||
91 | shr eax,8 |
||
92 | movzx edx,al |
||
93 | push ebx |
||
94 | push ecx |
||
95 | |||
96 | |||
97 | call calculate_button_y_coordinate_and_size |
||
98 | movzx eax,cx |
||
99 | shr eax,1 |
||
100 | sub eax,4 |
||
101 | shr ecx,16 |
||
102 | add eax,ecx |
||
103 | mov bx,ax |
||
104 | add ebx,18 shl 16 |
||
105 | mov ecx,[PanelText_color] |
||
2626 | mario79 | 106 | or ecx,0x40000000 |
107 | mov edx,[esp] ; __:_X |
||
5872 | pathoswith | 108 | and edx,15 |
2619 | mario79 | 109 | add ebx,10*65536 |
110 | add edx,text |
||
111 | mcall 4,,,,1,[Clock_color] ;time_bgr_color |
||
2626 | mario79 | 112 | |
2619 | mario79 | 113 | |
5872 | pathoswith | 114 | shr edx,4 |
2619 | mario79 | 115 | and edx,15 |
116 | sub ebx,6*65536 |
||
117 | add edx,text |
||
118 | mcall |
||
5872 | pathoswith | 119 | |
2619 | mario79 | 120 | |
5872 | pathoswith | 121 | and edx,15 |
2619 | mario79 | 122 | sub ebx,11*65536 |
123 | add edx,text |
||
124 | mcall |
||
125 | |||
126 | |||
5872 | pathoswith | 127 | shr edx,4 |
2619 | mario79 | 128 | and edx,15 |
129 | sub ebx,6*65536 |
||
130 | add edx,text |
||
131 | mcall |
||
132 | |||
5872 | pathoswith | 133 | |
2619 | mario79 | 134 | mov ebx,[pos_x_clock] |
135 | call calculate_button_y_coordinate_and_size |
||
136 | movzx eax,cx |
||
137 | shr eax,1 |
||
138 | sub eax,4 |
||
139 | shr ecx,16 |
||
140 | add eax,ecx |
||
141 | mov bx,ax |
||
142 | add ebx,17 shl 16 |
||
143 | mcall 3 |
||
144 | |||
145 | |||
146 | shr ecx,16 |
||
147 | and ecx,1 |
||
148 | mov edx,[PanelText_color] |
||
2626 | mario79 | 149 | sub edx,[Clock_color] ;time_bgr_color;[wcolor] |
2619 | mario79 | 150 | imul ecx,edx |
151 | add ecx,[Clock_color] ;time_bgr_color;[wcolor] |
||
152 | mcall 4,,,sec,1 |
||
153 | |||
154 | |||
5872 | pathoswith | 155 | ;--------------------------------------------------------------- |
156 | draw_list_button: |
||
2619 | mario79 | 157 | cmp [page_list_enable],dword 0 |
158 | je @f |
||
5872 | pathoswith | 159 | |
160 | |||
2619 | mario79 | 161 | mov ebx,[pos_x_page_list] |
162 | mov bx,10 |
||
163 | call calculate_button_y_coordinate_and_size |
||
2626 | mario79 | 164 | |
2619 | mario79 | 165 | |
166 | mov edx,[PageList_color] ;0xffffff |
||
167 | mov esi,[wcolor] |
||
168 | call draw_appl_button |
||
169 | |||
5872 | pathoswith | 170 | |
2619 | mario79 | 171 | mov edx,[PageList_color] ;0xffffff |
172 | mov esi,[wcolor] |
||
173 | call draw_appl_button |
||
174 | |||
175 | |||
176 | mov ebx,[pos_x_page_list] |
||
177 | add ebx,2 shl 16 |
||
178 | call calculate_button_y_coordinate_and_size |
||
2626 | mario79 | 179 | movzx eax,cx |
180 | shr eax,1 |
||
2619 | mario79 | 181 | sub eax,4 |
182 | shr ecx,16 |
||
2626 | mario79 | 183 | add eax,ecx |
184 | mov bx,ax |
||
2619 | mario79 | 185 | xor ecx,ecx |
186 | mcall 4,,,page_a1,5 |
||
187 | |||
188 | |||
189 | mcall |
||
190 | |||
5872 | pathoswith | 191 | |
2619 | mario79 | 192 | mov edx,ebx |
193 | add edx,9 shl 16 |
||
194 | mcall 47,0x20000,[page_list],,[system_colours.work_button_text] |
||
6219 | leency | 195 | @@: |
5872 | pathoswith | 196 | ret |
2619 | mario79 | 197 | ;--------------------------------------------------------------- |
5872 | pathoswith | 198 | draw_cpu_usage: |
2619 | mario79 | 199 | cmp [cpu_usage_enable],dword 0 |
200 | je @b |
||
5872 | pathoswith | 201 | |
2619 | mario79 | 202 | |
203 | |||
5872 | pathoswith | 204 | |
2619 | mario79 | 205 | sub eax,[button_top_offset] |
206 | sub eax,[button_bottom_offset] |
||
207 | sub eax,2 |
||
208 | mov [ysi],eax ;12 |
||
209 | mcall 18,5 ; TSC / SEC |
||
210 | |||
211 | |||
212 | push eax |
||
213 | mcall 18,4 ; IDLE / SEC |
||
214 | |||
215 | |||
216 | xor edx,edx |
||
217 | imul eax,[ysi] |
||
218 | cdq |
||
219 | pop ebx |
||
220 | inc ebx |
||
221 | div ebx |
||
222 | cmp eax,[ysi] |
||
223 | jng @f |
||
5872 | pathoswith | 224 | mov eax,[ysi] |
2619 | mario79 | 225 | @@: |
5872 | pathoswith | 226 | push eax |
2619 | mario79 | 227 | mov ebx,[pos_x_cpu_usage] |
228 | mov ecx,[button_top_offset] |
||
229 | shl ecx,16 |
||
230 | add ecx,[ysi] |
||
231 | add ecx,2 |
||
232 | mov edx,[CpuUsageBckgr_color] ;0xdd2222 |
||
233 | mov esi,[wcolor] |
||
234 | call draw_appl_button |
||
235 | pop eax |
||
236 | |||
237 | |||
238 | inc ecx |
||
239 | shl ecx,16 |
||
240 | add ecx,eax |
||
241 | add ebx,1 shl 16 |
||
242 | sub ebx,2 |
||
243 | mcall 13,,,[CpuUsage_color] ;0x44aa44 |
||
244 | |||
245 | |||
246 | @@: |
||
5872 | pathoswith | 247 | ret |
2619 | mario79 | 248 | ;--------------------------------------------------------------- |
5872 | pathoswith | 249 | ; get and draw keyboard layout |
250 | draw_flag: |
||
2619 | mario79 | 251 | cmp [chlang_enable],dword 0 |
252 | je @b |
||
5872 | pathoswith | 253 | cmp [draw_flag_certainly],0 |
2619 | mario79 | 254 | je @b |
5872 | pathoswith | 255 | |
2619 | mario79 | 256 | |
257 | |||
5872 | pathoswith | 258 | |
2619 | mario79 | 259 | mov edx,eax |
5872 | pathoswith | 260 | mov [type_lang],al |
2619 | mario79 | 261 | |
262 | |||
263 | mov ebx,[pos_x_cpu_chlang] |
||
264 | call calculate_button_y_coordinate_and_size |
||
265 | mov edx,[ChangeLang_color] ;time_bgr_color ;0xff ;[wcolor] |
||
266 | mov esi,[wcolor] |
||
267 | call draw_appl_button |
||
268 | popad |
||
269 | |||
270 | |||
271 | mov ax,bx |
||
272 | shr eax,1 |
||
273 | shl eax,16 |
||
274 | add ebx,eax |
||
275 | sub ebx,6 shl 16 |
||
276 | call calculate_button_y_coordinate_and_size |
||
277 | movzx eax,cx |
||
278 | shr eax,1 |
||
279 | sub eax,4 |
||
280 | shr ecx,16 |
||
281 | add eax,ecx |
||
282 | mov bx,ax |
||
283 | mov ecx,[PanelText_color] |
||
2626 | mario79 | 284 | |
2619 | mario79 | 285 | |
286 | push ebx |
||
5872 | pathoswith | 287 | mov [flag_text],flagTextSm |
288 | mcall 66,3 |
||
289 | test eax, 0x40 |
||
290 | jz @f |
||
291 | mov [flag_text],flagTextBg |
||
292 | @@: |
||
293 | pop ebx |
||
294 | end if |
||
2619 | mario79 | 295 | |
5872 | pathoswith | 296 | |
2619 | mario79 | 297 | shl edx,1 |
298 | add edx,[flag_text] |
||
5872 | pathoswith | 299 | mcall 4,,,,2 |
2619 | mario79 | 300 | popa |
301 | mov [draw_flag_certainly],0 |
||
302 | ret> |
||
303 |