Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 8427 → Rev 8484

/programs/system/menu/trunk/menu.asm
20,9 → 20,10
;
; Compile with FASM for Menuet
;******************************************************************************
BTN_HEIGHT = 22
BTN_WIDTH = 140
BTN_HEIGHT = 22 ;26
BTN_WIDTH = 140 ;178
TXT_Y = (BTN_HEIGHT)/2-4
FONT_TYPE = 0x80000000 ;0x90000000
 
PANEL_HEIGHT = 20
MENU_BOTTON_X_POS = 10
77,6 → 78,8
START: ; start of execution
mcall 68,11
 
mcall 30, 1, default_dir
 
mov esi,bootparam
cmp [esi],byte 0
je .no_boot_parameters
378,10 → 381,10
pop eax
mov ecx,40
mov al,'/'
mov al,'|'
cld
repne scasb
test ecx,ecx ; if '/' not found
test ecx,ecx ; if '|' not found
je searchexit
cmp [edi],byte '@' ; check for submenu
390,7 → 393,7
cmp [last_key],179
je searchexit
dec edi
;dec edi
push edi ; pointer to start of filename
call searchstartstring ; search for next string
sub edi,2 ; to last byte of string
435,7 → 438,7
mov [esi + child],al ; this is my child
mov cx,[esi + x_start]
add cx,141 ; new x_start in cx
add cx,BTN_WIDTH+1 ; new x_start in cx
movzx edx,al
shl edx,4
add edx,[menu_data] ; edx points to child's base address
684,9 → 687,10
mov eax,[menu_mame]
cmp [ebx+10],eax
jne @f
mov ax,[menu_mame+4]
cmp [ebx+14],ax
jne @f
; temporary to fit into 3 IMG sectors
;mov ax,[menu_mame+4]
;cmp [ebx+14],ax
;jne @f
cmp ecx,[active_process]
je @f
; dph ecx
855,18 → 859,20
; from system close button with 0x000001 id
; dunkaist]
mcall
pusha
push edx
mov edx, esi
mcall 13
mcall , BTN_WIDTH, <[draw_y],1>, [sc.work_light]
mcall , 1, <[draw_y],BTN_HEIGHT>
mcall , <BTN_WIDTH,1>, <[draw_y],BTN_HEIGHT+1>, [sc.work_dark]
add ecx, BTN_HEIGHT-1
mcall , 1
inc ecx
mcall , <BTN_WIDTH,1>, , [sc.work_dark]
add [draw_y], BTN_HEIGHT-1
mcall , BTN_WIDTH, <[draw_y],1>
popa
pop edx
movzx edx,dl
dec dl
imul ebx,edx,BTN_HEIGHT
905,8 → 911,8
ret
;------------------------------------------------------------------------------
;*** DATA AREA ****************************************************************
menu_mame:
db '@MENU',0
menu_mame: db '@MENU',0
default_dir: db '/sys',0
 
align 4
free_my_area_lock dd 0
933,7 → 939,7
.size dd 0 ; bytes to read
.return dd procinfo ; return data pointer
.name:
db '/SYS/SETTINGS/MENU.DAT',0 ; ASCIIZ dir & filename
db 'SETTINGS/MENU.DAT',0 ; ASCIIZ dir & filename
;--------------------------------------
align 4
fileinfo_start: