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
@ -35,7 +35,7 @@ end if
|
|||||||
label5:
|
label5:
|
||||||
db '(End) (Home)',0
|
db '(End) (Home)',0
|
||||||
label6:
|
label6:
|
||||||
db '(Enter) (Esc)',0
|
db '(Enter) (Esc)',0
|
||||||
|
|
||||||
rdsave:
|
rdsave:
|
||||||
dd 7,0,hide,0,0
|
dd 7,0,hide,0,0
|
||||||
@ -90,7 +90,7 @@ aini_get_int db 'ini_get_int',0
|
|||||||
aini_set_int db 'ini_set_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
|
hide db 'h',0
|
||||||
asettings db 'settings',0
|
asettings db 'settings',0
|
||||||
|
@ -42,11 +42,11 @@ stdcall dll.Init,[init_lib]
|
|||||||
|
|
||||||
invoke ini_get_int,ini_file,asettings,aautosave,0
|
invoke ini_get_int,ini_file,asettings,aautosave,0
|
||||||
mov [autosave],eax
|
mov [autosave],eax
|
||||||
cmp eax,1
|
dec eax
|
||||||
jne @f
|
jnz @f
|
||||||
bts dword [check1.flags],1
|
bts dword [check1.flags],1
|
||||||
@@:
|
@@:
|
||||||
mcall 40,0x00000027
|
mcall 40,0x80000027
|
||||||
redraw:
|
redraw:
|
||||||
call draw_window
|
call draw_window
|
||||||
still:
|
still:
|
||||||
@ -74,16 +74,18 @@ key:
|
|||||||
mcall ;eax=2 - get key code
|
mcall ;eax=2 - get key code
|
||||||
mov al,ah
|
mov al,ah
|
||||||
cmp al,13
|
cmp al,13
|
||||||
jz restart
|
je restart
|
||||||
cmp al,19
|
cmp al,19
|
||||||
jz checkbox
|
je checkbox
|
||||||
cmp al,27
|
|
||||||
jz close
|
|
||||||
cmp al,180
|
cmp al,180
|
||||||
jz restart_kernel
|
je restart_kernel
|
||||||
cmp al,181
|
cmp al,181
|
||||||
jz power_off
|
je power_off
|
||||||
jmp still
|
cmp al,27
|
||||||
|
jne still
|
||||||
|
|
||||||
|
close:
|
||||||
|
mcall -1
|
||||||
|
|
||||||
button:
|
button:
|
||||||
mcall 17 ;eax=17 - get pressed button id
|
mcall 17 ;eax=17 - get pressed button id
|
||||||
@ -120,7 +122,7 @@ mcall_and_close:
|
|||||||
mov ecx,eax
|
mov ecx,eax
|
||||||
@@:
|
@@:
|
||||||
push ecx
|
push ecx
|
||||||
mcall 23,50
|
mcall 23,100
|
||||||
dec eax
|
dec eax
|
||||||
jnz no_red
|
jnz no_red
|
||||||
call draw_window
|
call draw_window
|
||||||
@ -134,9 +136,6 @@ no_save:
|
|||||||
pop ecx
|
pop ecx
|
||||||
mcall 18,9
|
mcall 18,9
|
||||||
|
|
||||||
close:
|
|
||||||
mcall -1
|
|
||||||
|
|
||||||
checkbox:
|
checkbox:
|
||||||
btc dword [check1.flags],1
|
btc dword [check1.flags],1
|
||||||
jc .1
|
jc .1
|
||||||
@ -151,18 +150,19 @@ checkbox:
|
|||||||
|
|
||||||
draw_window:
|
draw_window:
|
||||||
mov al,12
|
mov al,12
|
||||||
mcall ,1
|
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
|
movzx ecx,ax
|
||||||
shr eax,17
|
shr eax,17
|
||||||
shl eax,16
|
shl eax,16
|
||||||
lea ebx,[eax-110 shl 16+222]
|
lea ebx,[eax-110 shl 16+222]
|
||||||
shr ecx,1
|
shr ecx,1
|
||||||
shl ecx,16
|
shl ecx,16
|
||||||
lea ecx,[ecx-70 shl 16+117]
|
lea ecx,[ecx-70 shl 16+117]
|
||||||
|
|
||||||
xor eax,eax
|
xor eax,eax
|
||||||
mcall , , ,0x019098b0,0x01000000 ;define and draw window
|
mcall , , ,0x019098b0,0x01000000 ;define and draw window
|
||||||
|
|
||||||
mov al,13
|
mov al,13
|
||||||
@ -170,25 +170,26 @@ draw_window:
|
|||||||
mcall ,<1,221>,<1,116>,0xffffff
|
mcall ,<1,221>,<1,116>,0xffffff
|
||||||
mcall ,<2,220>,<2,115>,0xe4dfe1
|
mcall ,<2,220>,<2,115>,0xe4dfe1
|
||||||
|
|
||||||
mov al,8
|
mov al,8
|
||||||
mcall ,<16,90> ,<20,27>,4,0x990022 ;eax=8 - draw buttons
|
mcall ,<16,90> ,<20,27>,4,0x990022 ;eax=8 - draw buttons
|
||||||
mcall ,<113,90>, ,2,0xaa7700
|
mcall ,<113,90>, ,2,0xaa7700
|
||||||
mcall , ,<54,27>,1,0x777777
|
mcall , ,<54,27>,1,0x777777
|
||||||
mcall ,<16,90> , ,3,0x007700
|
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
|
push dword check1
|
||||||
call [check_box_draw2]
|
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
|
mov al,12
|
||||||
mcall ,2
|
mcall ,2
|
||||||
ret
|
ret
|
||||||
|
;---------------------------------------------------------------------
|
||||||
data
|
;data
|
||||||
include 'data.inc'
|
include 'data.inc'
|
||||||
|
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user