forked from KolibriOS/kolibrios
END: small fixes and optimisation.
git-svn-id: svn://kolibrios.org@4215 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
e46ed0d527
commit
af06bca26e
@ -90,7 +90,7 @@ aini_get_int db 'ini_get_int',0
|
||||
aini_set_int db 'ini_set_int',0
|
||||
;---------------------------------------------------------------------
|
||||
|
||||
check1 check_box2 20 shl 16 +8,93 shl 16 +8,6,0xffffff,0,0,label4
|
||||
check1 check_box2 20 shl 16 +8,96 shl 16 +8,6,0xffffff,0,0,label4
|
||||
|
||||
hide db 'h',0
|
||||
asettings db 'settings',0
|
||||
|
@ -42,11 +42,11 @@ stdcall dll.Init,[init_lib]
|
||||
|
||||
invoke ini_get_int,ini_file,asettings,aautosave,0
|
||||
mov [autosave],eax
|
||||
cmp eax,1
|
||||
jne @f
|
||||
dec eax
|
||||
jnz @f
|
||||
bts dword [check1.flags],1
|
||||
@@:
|
||||
mcall 40,0x00000027
|
||||
mcall 40,0x80000027
|
||||
redraw:
|
||||
call draw_window
|
||||
still:
|
||||
@ -74,16 +74,18 @@ key:
|
||||
mcall ;eax=2 - get key code
|
||||
mov al,ah
|
||||
cmp al,13
|
||||
jz restart
|
||||
je restart
|
||||
cmp al,19
|
||||
jz checkbox
|
||||
cmp al,27
|
||||
jz close
|
||||
je checkbox
|
||||
cmp al,180
|
||||
jz restart_kernel
|
||||
je restart_kernel
|
||||
cmp al,181
|
||||
jz power_off
|
||||
jmp still
|
||||
je power_off
|
||||
cmp al,27
|
||||
jne still
|
||||
|
||||
close:
|
||||
mcall -1
|
||||
|
||||
button:
|
||||
mcall 17 ;eax=17 - get pressed button id
|
||||
@ -120,7 +122,7 @@ mcall_and_close:
|
||||
mov ecx,eax
|
||||
@@:
|
||||
push ecx
|
||||
mcall 23,50
|
||||
mcall 23,100
|
||||
dec eax
|
||||
jnz no_red
|
||||
call draw_window
|
||||
@ -134,9 +136,6 @@ no_save:
|
||||
pop ecx
|
||||
mcall 18,9
|
||||
|
||||
close:
|
||||
mcall -1
|
||||
|
||||
checkbox:
|
||||
btc dword [check1.flags],1
|
||||
jc .1
|
||||
@ -153,7 +152,8 @@ draw_window:
|
||||
mov al,12
|
||||
mcall ,1
|
||||
|
||||
mcall 14 ;eax=14 - get screen max x & max y
|
||||
mov al,14
|
||||
mcall ;eax=14 - get screen max x & max y
|
||||
movzx ecx,ax
|
||||
shr eax,17
|
||||
shl eax,16
|
||||
@ -176,19 +176,20 @@ draw_window:
|
||||
mcall , ,<54,27>,1,0x777777
|
||||
mcall ,<16,90> , ,3,0x007700
|
||||
|
||||
mov al,4
|
||||
mcall ,<27,24> ,0x90ffffff,label2 ;eax=4 - write text
|
||||
mcall ,<23,58> , ,label3
|
||||
mcall ,<47,37> , ,label5
|
||||
mcall ,<41,71> , ,label6
|
||||
|
||||
push dword check1
|
||||
call [check_box_draw2]
|
||||
|
||||
mcall 4,<27,24> ,0x90ffffff,label2 ;eax=4 - write text
|
||||
mcall ,<23,58> , ,label3
|
||||
mcall ,<47,37> ,0x90ffffff,label5
|
||||
mcall ,<44,71> , ,label6
|
||||
|
||||
mov al,12
|
||||
mcall ,2
|
||||
ret
|
||||
|
||||
data
|
||||
;---------------------------------------------------------------------
|
||||
;data
|
||||
include 'data.inc'
|
||||
|
||||
;---------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user