diff --git a/programs/system/colrdial/color_dialog.asm b/programs/system/colrdial/color_dialog.asm index 4b2f957295..29b6b54f0f 100644 --- a/programs/system/colrdial/color_dialog.asm +++ b/programs/system/colrdial/color_dialog.asm @@ -96,7 +96,9 @@ c_start_y = 10 c_size_x = 40 c_size_y = 20 ;--------------------------------------------------------------------- - +x_minimal_size equ 350 +y_minimal_size equ 250 +;--------------------------------------------------------------------- START: mcall 68,11 mcall 66,1,1 @@ -180,8 +182,34 @@ button: ; dpd eax ; newline + call get_window_param + mov ebx,[communication_area] + mov ecx,procinfo +; mov eax,[window_x] + mov eax,[ecx+34] + shl eax,16 + add eax,[ecx+42] + mov [ebx+4],eax +; mov eax,[window_y] + mov eax,[ecx+38] + shl eax,16 + add eax,[ecx+46] + mov [ebx+8],eax + mcall -1 ;--------------------------------------------------------------------- +get_window_param: + mcall 9,procinfo,-1 + mov eax,[ebx+66] + inc eax +; mov [window_high],eax + mov eax,[ebx+62] + inc eax +; mov [window_width],eax + mov eax,[ebx+70] +; mov [window_status],eax + ret +;--------------------------------------------------------------------- align 4 get_communication_area: xor eax,eax @@ -193,14 +221,14 @@ get_communication_area: ; movzx ebx,word [eax+2] ; mov [color_dialog_type],ebx -; mov ebx,[eax+4] -; cmp bx,word x_minimal_size ;300 -; jb @f -; mov [window_x],ebx -; mov ebx,[eax+8] -; cmp bx,word y_minimal_size ;200 -; jb @f -; mov [window_y],ebx + mov ebx,[eax+4] + cmp bx,word x_minimal_size ;300 + jb @f + mov [window_x],ebx + mov ebx,[eax+8] + cmp bx,word y_minimal_size ;200 + jb @f + mov [window_y],ebx @@: ret ;--------------------------------------------------------------------- @@ -254,6 +282,7 @@ color_button: mov eax,[communication_area] mov [eax],word 1 mov ebx,[selected_color] + and ebx,0xffffff mov [eax+20],ebx ; dps "CD flag value: OK " jmp button.exit_1 @@ -283,7 +312,8 @@ draw_tone: align 4 draw_window: mcall 12,1 - mcall 0, , , 0x33AABBCC,,title +; mcall 0, , , 0x33AABBCC,,title + mcall 0,[window_x],[window_y], 0x33AABBCC,,title mcall 8,,,0x60000002 mcall ,,,0x60000003 mcall 65,[palette_area],<[palette_SIZE_X],[palette_SIZE_Y]>,,24 diff --git a/programs/system/colrdial/i_data.inc b/programs/system/colrdial/i_data.inc index 4811ddd51a..26866be84d 100644 --- a/programs/system/colrdial/i_data.inc +++ b/programs/system/colrdial/i_data.inc @@ -2,3 +2,11 @@ title: db 'ColorDialog',0 ;--------------------------------------------------------------------- +align 4 +window_x: +.x_size dw 420 +.x_start dw 10 +window_y: +.y_size dw 320 +.y_start dw 10 +;--------------------------------------------------------------------- \ No newline at end of file