2012-04-17 01:46:54 +02:00
|
|
|
|
2015-11-01 18:59:25 +01:00
|
|
|
draw_tray: ; draw cpu usage, time, date etc.
|
|
|
|
pusha
|
2012-04-17 01:46:54 +02:00
|
|
|
call draw_tray_buttons
|
|
|
|
call draw_time_skin
|
|
|
|
call draw_time
|
|
|
|
mov [draw_flag_certainly],1
|
2015-11-01 18:59:25 +01:00
|
|
|
call draw_flag ; language
|
2012-04-17 01:46:54 +02:00
|
|
|
call draw_list_button
|
|
|
|
popa
|
|
|
|
ret
|
2015-11-01 18:59:25 +01:00
|
|
|
;---------------------------------------------------------------
|
2012-04-17 01:46:54 +02:00
|
|
|
draw_tray_buttons:
|
|
|
|
mov [offset_x_tray],0
|
|
|
|
cmp [minimize_right],dword 0
|
|
|
|
je @f
|
|
|
|
add [offset_x_tray],MR_SIZE
|
|
|
|
@@:
|
2013-10-15 13:57:12 +02:00
|
|
|
mov ecx,[height]
|
2012-04-17 01:46:54 +02:00
|
|
|
mov esi,[wcolor]
|
|
|
|
mov eax,8
|
|
|
|
cmp [clock_enable],dword 0
|
|
|
|
je @f
|
|
|
|
add [offset_x_tray],CLOCK_SIZE
|
|
|
|
mov ebx,[max_x]
|
|
|
|
sub ebx,[offset_x_tray]
|
|
|
|
shl ebx,16
|
2013-10-15 13:57:12 +02:00
|
|
|
add ebx,CLOCK_SIZE+1
|
2015-11-01 18:59:25 +01:00
|
|
|
mcall ,,,0x60000000+2 ; time/date button
|
|
|
|
sub ebx,3
|
2012-04-17 01:46:54 +02:00
|
|
|
mov [pos_x_clock],ebx
|
|
|
|
@@:
|
|
|
|
cmp [cpu_usage_enable],dword 0
|
|
|
|
je @f
|
|
|
|
add [offset_x_tray],CPU_USAGE_SIZE
|
|
|
|
mov ebx,[max_x]
|
|
|
|
sub ebx,[offset_x_tray]
|
|
|
|
shl ebx,16
|
2013-10-15 13:57:12 +02:00
|
|
|
add ebx,CPU_USAGE_SIZE+1
|
|
|
|
mcall ,,,0x60000000+18 ;button 18 - sysmeter_name (GMON)
|
2015-11-01 18:59:25 +01:00
|
|
|
sub ebx,3
|
2012-04-17 01:46:54 +02:00
|
|
|
mov [pos_x_cpu_usage],ebx
|
|
|
|
@@:
|
|
|
|
cmp [chlang_enable],dword 0
|
|
|
|
je @f
|
|
|
|
add [offset_x_tray],CHLANG_SIZE
|
|
|
|
mov ebx,[max_x]
|
|
|
|
sub ebx,[offset_x_tray]
|
|
|
|
shl ebx,16
|
2013-10-15 13:57:12 +02:00
|
|
|
add ebx,CHLANG_SIZE+1
|
|
|
|
mcall ,,,0x60000000+16 ;button 16 - chang language
|
2015-11-01 18:59:25 +01:00
|
|
|
sub ebx,3
|
2012-04-17 01:46:54 +02:00
|
|
|
mov [pos_x_cpu_chlang],ebx
|
|
|
|
@@:
|
|
|
|
cmp [page_list_enable],dword 0
|
|
|
|
je @f
|
|
|
|
add [offset_x_tray],PAGE_LIST_SIZE
|
|
|
|
mov ebx,[max_x]
|
|
|
|
sub ebx,[offset_x_tray]
|
|
|
|
shl ebx,16
|
|
|
|
add ebx,10
|
|
|
|
mov [pos_x_page_list],ebx
|
2013-10-15 13:57:12 +02:00
|
|
|
mcall ,,,0x60000000+22 ;button 22 - page list decrease
|
2015-11-01 18:59:25 +01:00
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
add ebx,24 shl 16
|
2013-10-15 13:57:12 +02:00
|
|
|
mcall ,,,0x60000000+21 ;button 21 - page list decrease
|
2012-04-17 01:46:54 +02:00
|
|
|
@@:
|
|
|
|
ret
|
2015-11-01 18:59:25 +01:00
|
|
|
;---------------------------------------------------------------
|
2012-04-17 01:46:54 +02:00
|
|
|
draw_time_skin:
|
|
|
|
cmp [clock_enable],dword 0
|
2015-11-01 18:59:25 +01:00
|
|
|
je @b
|
2012-04-17 01:46:54 +02:00
|
|
|
mov ebx,[pos_x_clock]
|
|
|
|
call calculate_button_y_coordinate_and_size
|
2015-11-01 18:59:25 +01:00
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
mov edx,[Clock_color] ;time_bgr_color
|
|
|
|
mov esi,[wcolor]
|
2015-11-01 18:59:25 +01:00
|
|
|
jmp draw_appl_button
|
|
|
|
;---------------------------------------------------------------
|
2012-04-17 01:46:54 +02:00
|
|
|
draw_time:
|
|
|
|
cmp [clock_enable],dword 0
|
2015-11-01 18:59:25 +01:00
|
|
|
je @b
|
2012-04-17 01:46:54 +02:00
|
|
|
mcall 3
|
|
|
|
cmp eax,[ptime]
|
2015-11-01 18:59:25 +01:00
|
|
|
jz @b
|
2012-04-17 01:46:54 +02:00
|
|
|
mov [ptime],eax
|
2015-11-01 18:59:25 +01:00
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
; draw hours and minutes
|
|
|
|
movzx ebx,al
|
|
|
|
shr eax,8
|
|
|
|
movzx ecx,al
|
|
|
|
shr eax,8
|
|
|
|
movzx edx,al
|
|
|
|
push ebx
|
|
|
|
push ecx
|
|
|
|
|
|
|
|
mov ebx,[pos_x_clock]
|
|
|
|
call calculate_button_y_coordinate_and_size
|
|
|
|
movzx eax,cx
|
|
|
|
shr eax,1
|
|
|
|
sub eax,4
|
|
|
|
shr ecx,16
|
|
|
|
add eax,ecx
|
|
|
|
mov bx,ax
|
|
|
|
add ebx,18 shl 16
|
2012-04-18 00:58:52 +02:00
|
|
|
mov ecx,[PanelText_color]
|
|
|
|
or ecx,0x40000000
|
2015-11-01 18:59:25 +01:00
|
|
|
mov edx,[esp] ; __:_X
|
2012-04-17 01:46:54 +02:00
|
|
|
and edx,15
|
|
|
|
add ebx,10*65536
|
|
|
|
add edx,text
|
2012-04-18 00:58:52 +02:00
|
|
|
mcall 4,,,,1,[Clock_color] ;time_bgr_color
|
2012-04-17 01:46:54 +02:00
|
|
|
|
2015-11-01 18:59:25 +01:00
|
|
|
pop edx ; __:X_
|
2012-04-17 01:46:54 +02:00
|
|
|
shr edx,4
|
|
|
|
and edx,15
|
|
|
|
sub ebx,6*65536
|
|
|
|
add edx,text
|
2015-11-01 18:59:25 +01:00
|
|
|
mcall
|
2012-04-17 01:46:54 +02:00
|
|
|
|
2015-11-01 18:59:25 +01:00
|
|
|
mov edx,[esp] ; _X:__
|
2012-04-17 01:46:54 +02:00
|
|
|
and edx,15
|
|
|
|
sub ebx,11*65536
|
|
|
|
add edx,text
|
|
|
|
mcall
|
|
|
|
|
2015-11-01 18:59:25 +01:00
|
|
|
pop edx ; X_:__
|
2012-04-17 01:46:54 +02:00
|
|
|
shr edx,4
|
|
|
|
and edx,15
|
|
|
|
sub ebx,6*65536
|
|
|
|
add edx,text
|
|
|
|
mcall
|
2015-11-01 18:59:25 +01:00
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
; draw seconds
|
|
|
|
mov ebx,[pos_x_clock]
|
|
|
|
call calculate_button_y_coordinate_and_size
|
|
|
|
movzx eax,cx
|
|
|
|
shr eax,1
|
|
|
|
sub eax,4
|
|
|
|
shr ecx,16
|
|
|
|
add eax,ecx
|
|
|
|
mov bx,ax
|
|
|
|
add ebx,17 shl 16
|
|
|
|
mcall 3
|
|
|
|
|
|
|
|
mov ecx,eax
|
|
|
|
shr ecx,16
|
|
|
|
and ecx,1
|
2012-04-18 00:58:52 +02:00
|
|
|
mov edx,[PanelText_color]
|
2012-04-17 01:46:54 +02:00
|
|
|
sub edx,[Clock_color] ;time_bgr_color;[wcolor]
|
|
|
|
imul ecx,edx
|
|
|
|
add ecx,[Clock_color] ;time_bgr_color;[wcolor]
|
|
|
|
mcall 4,,,sec,1
|
|
|
|
|
2015-11-01 18:59:25 +01:00
|
|
|
jmp draw_cpu_usage
|
|
|
|
;---------------------------------------------------------------
|
2012-04-17 01:46:54 +02:00
|
|
|
draw_list_button:
|
|
|
|
cmp [page_list_enable],dword 0
|
2015-11-01 18:59:25 +01:00
|
|
|
je @f
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
; draw page list button "skin"
|
|
|
|
mov ebx,[pos_x_page_list]
|
|
|
|
mov bx,10
|
2012-04-18 00:58:52 +02:00
|
|
|
call calculate_button_y_coordinate_and_size
|
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
xor edx,edx
|
|
|
|
mov edx,[PageList_color] ;0xffffff
|
|
|
|
mov esi,[wcolor]
|
|
|
|
call draw_appl_button
|
|
|
|
|
2015-11-01 18:59:25 +01:00
|
|
|
add ebx,24 shl 16 ; 18 shl 16
|
2012-04-17 01:46:54 +02:00
|
|
|
mov edx,[PageList_color] ;0xffffff
|
|
|
|
mov esi,[wcolor]
|
|
|
|
call draw_appl_button
|
|
|
|
|
|
|
|
; draw page list button text <>
|
|
|
|
mov ebx,[pos_x_page_list]
|
|
|
|
add ebx,2 shl 16
|
2012-04-18 00:58:52 +02:00
|
|
|
call calculate_button_y_coordinate_and_size
|
|
|
|
movzx eax,cx
|
2012-04-17 01:46:54 +02:00
|
|
|
shr eax,1
|
|
|
|
sub eax,4
|
2012-04-18 00:58:52 +02:00
|
|
|
shr ecx,16
|
|
|
|
add eax,ecx
|
2012-04-17 01:46:54 +02:00
|
|
|
mov bx,ax
|
|
|
|
xor ecx,ecx
|
|
|
|
mcall 4,,,page_a1,5
|
|
|
|
|
|
|
|
add ebx,1 shl 16
|
|
|
|
mcall
|
2015-11-01 18:59:25 +01:00
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
; draw page list number
|
|
|
|
mov edx,ebx
|
|
|
|
add edx,9 shl 16
|
2016-02-14 19:42:49 +01:00
|
|
|
mcall 47,0x20000,[page_list],,[system_colours.taskbar_text]
|
2015-11-01 18:59:25 +01:00
|
|
|
@@:
|
2012-04-17 01:46:54 +02:00
|
|
|
ret
|
2015-11-01 18:59:25 +01:00
|
|
|
;---------------------------------------------------------------
|
2012-04-17 01:46:54 +02:00
|
|
|
draw_cpu_usage:
|
|
|
|
cmp [cpu_usage_enable],dword 0
|
2015-11-01 18:59:25 +01:00
|
|
|
je @b
|
2012-04-17 01:46:54 +02:00
|
|
|
|
|
|
|
pushad
|
2015-11-01 18:59:25 +01:00
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
mov eax,[height]
|
|
|
|
sub eax,[button_top_offset]
|
|
|
|
sub eax,[button_bottom_offset]
|
|
|
|
sub eax,2
|
|
|
|
mov [ysi],eax ;12
|
|
|
|
mcall 18,5 ; TSC / SEC
|
|
|
|
|
|
|
|
shr eax,20
|
|
|
|
push eax
|
|
|
|
mcall 18,4 ; IDLE / SEC
|
|
|
|
|
|
|
|
shr eax,20
|
|
|
|
xor edx,edx
|
|
|
|
imul eax,[ysi]
|
|
|
|
cdq
|
|
|
|
pop ebx
|
|
|
|
inc ebx
|
|
|
|
div ebx
|
|
|
|
cmp eax,[ysi]
|
2015-11-01 18:59:25 +01:00
|
|
|
jng @f
|
2012-04-17 01:46:54 +02:00
|
|
|
mov eax,[ysi]
|
2015-11-01 18:59:25 +01:00
|
|
|
@@:
|
2012-04-17 01:46:54 +02:00
|
|
|
push eax
|
|
|
|
mov ebx,[pos_x_cpu_usage]
|
|
|
|
mov ecx,[button_top_offset]
|
|
|
|
shl ecx,16
|
|
|
|
add ecx,[ysi]
|
|
|
|
add ecx,2
|
|
|
|
mov edx,[CpuUsageBckgr_color] ;0xdd2222
|
|
|
|
mov esi,[wcolor]
|
|
|
|
call draw_appl_button
|
|
|
|
pop eax
|
|
|
|
|
|
|
|
mov ecx,[button_top_offset]
|
|
|
|
inc ecx
|
|
|
|
shl ecx,16
|
|
|
|
add ecx,eax
|
|
|
|
add ebx,1 shl 16
|
|
|
|
sub ebx,2
|
|
|
|
mcall 13,,,[CpuUsage_color] ;0x44aa44
|
|
|
|
|
|
|
|
popad
|
2015-11-01 18:59:25 +01:00
|
|
|
@@:
|
2012-04-17 01:46:54 +02:00
|
|
|
ret
|
2015-11-01 18:59:25 +01:00
|
|
|
;---------------------------------------------------------------
|
|
|
|
; get and draw keyboard layout
|
2012-04-17 01:46:54 +02:00
|
|
|
draw_flag:
|
|
|
|
cmp [chlang_enable],dword 0
|
2015-11-01 18:59:25 +01:00
|
|
|
je @b
|
2012-04-17 01:46:54 +02:00
|
|
|
cmp [draw_flag_certainly],0
|
2015-11-01 18:59:25 +01:00
|
|
|
je @b
|
2012-04-17 01:46:54 +02:00
|
|
|
|
|
|
|
pusha
|
|
|
|
|
2015-11-01 18:59:25 +01:00
|
|
|
mcall 26,2,9
|
|
|
|
mov edx,eax
|
2012-04-17 01:46:54 +02:00
|
|
|
mov [type_lang],al
|
|
|
|
|
|
|
|
pushad
|
|
|
|
mov ebx,[pos_x_cpu_chlang]
|
|
|
|
call calculate_button_y_coordinate_and_size
|
|
|
|
mov edx,[ChangeLang_color] ;time_bgr_color ;0xff ;[wcolor]
|
|
|
|
mov esi,[wcolor]
|
|
|
|
call draw_appl_button
|
|
|
|
popad
|
|
|
|
|
|
|
|
mov ebx,[pos_x_cpu_chlang]
|
|
|
|
mov ax,bx
|
|
|
|
shr eax,1
|
|
|
|
shl eax,16
|
|
|
|
add ebx,eax
|
|
|
|
sub ebx,6 shl 16
|
|
|
|
call calculate_button_y_coordinate_and_size
|
|
|
|
movzx eax,cx
|
|
|
|
shr eax,1
|
|
|
|
sub eax,4
|
|
|
|
shr ecx,16
|
|
|
|
add eax,ecx
|
|
|
|
mov bx,ax
|
2012-04-18 00:58:52 +02:00
|
|
|
mov ecx,[PanelText_color]
|
2012-04-17 01:46:54 +02:00
|
|
|
|
|
|
|
if caps_lock_check
|
2015-11-01 18:59:25 +01:00
|
|
|
push ebx
|
|
|
|
mov [flag_text],flagTextSm
|
|
|
|
mcall 66,3
|
|
|
|
test eax, 0x40
|
|
|
|
jz @f
|
|
|
|
mov [flag_text],flagTextBg
|
|
|
|
@@:
|
|
|
|
pop ebx
|
2012-04-17 01:46:54 +02:00
|
|
|
end if
|
2015-11-01 18:59:25 +01:00
|
|
|
|
2012-04-17 01:46:54 +02:00
|
|
|
dec edx
|
|
|
|
shl edx,1
|
2015-11-01 18:59:25 +01:00
|
|
|
add edx,[flag_text]
|
2012-04-17 01:46:54 +02:00
|
|
|
mcall 4,,,,2
|
|
|
|
popa
|
|
|
|
mov [draw_flag_certainly],0
|
|
|
|
ret
|