3,14 → 3,11 |
;------------------------------------------------- |
panel_interraction: |
;>>>>>>>>>>>>>>>>>>>>>>>>>> |
mov eax,18 |
mov ebx,14 |
;mcall |
; mcall 18,14 |
|
and [Panel_flag],0 |
;collision with text on panel |
next_columnus_text: |
|
mov eax,[edi] |
mov ebx,[edi+4] |
sub eax,10 |
34,10 → 31,9 |
mov edi,[button_menu_size_y] |
mov esi,[button_menu_size_x] |
call columnus |
pop edi |
|
pop edi |
mov esi,7 |
|
test eax,eax |
jz no_columnus_text |
|
44,23 → 40,18 |
mov esi,1 |
mov [Panel_flag],1 |
call GetMouseClick |
|
test eax,eax |
jz no_mouse_pressed |
|
mov eax,18 |
mov ebx,14 |
;mcall |
; mcall 18,14 |
|
call print_panel_menu |
jmp print_panel_menu |
|
no_mouse_pressed: |
|
no_columnus_text: |
|
mov eax,[Icon_text_x] |
mov ebx,[Icon_text_y] |
mov ecx,[button_menu_size_x] ;------------------------- |
mov ecx,[button_menu_size_x] |
mov edx,[button_menu_size_y] |
call draw_volume_rectangle |
|
69,32 → 60,26 |
mov [counter],7 |
mov edi,panel_text |
call print_panel_text |
|
pop edi |
pop [counter] |
|
dec [counter] |
jnz next_columnus_text |
|
ret |
jmp still |
;--------------------------------------------------------- |
;-----draw panel menu(main engin of panel)---------------- |
;--------------------------------------------------------- |
print_panel_menu: |
|
|
push [counter] |
;delit main buttons(some time) |
|
mov [counter],10 |
|
next_icon_delit1: |
|
mov eax,8 |
mov edx,[counter] |
add edx,11100000000000000000000000000000b |
mcall |
mcall 8 |
inc [counter] |
|
cmp [counter],30 |
jl next_icon_delit1 |
|
102,13 → 87,10 |
mov [counter],40 |
|
next_icon_delit2: |
|
mov eax,8 |
mov edx,[counter] |
add edx,11100000000000000000000000000000b |
mcall |
mcall 8 |
inc [counter] |
|
cmp [counter],45 |
jl next_icon_delit2 |
|
116,28 → 98,22 |
mov [counter],45 |
|
next_icon_delit3: |
|
mov eax,8 |
mov edx,[counter] |
add edx,11100000000000000000000000000000b |
mcall |
mcall 8 |
inc [counter] |
|
cmp [counter],50 |
jl next_icon_delit3 |
|
;delit buttons of palette |
mov eax,8 |
mov edx,51 |
add edx,11100000000000000000000000000000b |
mcall |
mcall 8 |
|
|
;delit buttons of color |
mov eax,8 |
mov edx,52 |
add edx,11100000000000000000000000000000b |
mcall |
mcall 8 |
|
pop [counter] |
|
157,8 → 133,6 |
pop esi |
|
calculate_counter_menu: |
|
|
;calculate menu counter |
mov eax,[counter] |
dec eax |
169,15 → 143,12 |
call GetMouseCoordinats |
|
and [menu_counter],0 |
push esi |
push edi |
|
push esi edi |
;ᣫ ¦¨¢ ¨¥ ¨¬ 樨 >>>>>>>>>>>>>>>>>> |
mov eax,18 |
mov ebx,14 |
;mcall |
; mcall 18,4 |
|
menu_loop: |
|
mov eax,[menu_coordinat_x] |
mov ebx,36 |
mov ecx,[MouseX] |
197,7 → 168,6 |
mov esi,1 |
|
no_columnus_menu_text: |
|
mov eax,[menu_coordinat_x] |
mov ebx,36 |
mov ecx,[menu_size_x] |
209,11 → 179,9 |
call draw_volume_rectangle |
add [menu_counter],20 |
|
|
dec [counter_menu] |
jnz menu_loop |
|
|
;print menu text |
push [counter] |
mov esi,[counter] |
224,26 → 192,18 |
mov [counter],eax |
call print_panel_text |
pop [counter] |
pop edi |
pop esi |
pop edi esi |
|
|
menu_still: |
|
mov eax,10 |
mcall |
mov eax,2 |
mcall |
mov eax,17 |
mcall |
|
mcall 10 |
mcall 2 |
mcall 17 |
call GetMouseClick |
|
test eax,eax |
jz calculate_counter_menu |
|
call GetMouseCoordinats |
|
;calculate menu counter |
mov eax,[counter] |
dec eax |
254,12 → 214,9 |
and [menu_counter],0 |
and [counter_11],0 |
|
push esi |
push edi |
push esi edi |
|
menu_loop2: |
|
|
mov eax,[menu_coordinat_x] |
mov ebx,36 |
mov ecx,[MouseX] |
273,7 → 230,6 |
call columnus |
|
inc [counter_11] |
|
test eax,eax |
jz no_columnus_menu_text2 |
|
281,40 → 237,30 |
mov [number_menu],esi |
|
no_columnus_menu_text2: |
|
add [menu_counter],20 |
|
dec [counter_menu] |
jnz menu_loop2 |
|
pop edi |
pop esi |
pop edi esi |
|
mov eax,5 |
mov ebx,15 |
mcall |
mcall 5,15 |
|
push [counter] |
pushad |
|
pusha |
call drawwin |
|
popad |
popa |
pop [counter] |
|
mov eax,[counter] |
mov [number_panel],eax |
|
call TakeInstruments |
jmp still |
jmp TakeInstruments |
|
;--------------------------------------------------------- |
;------print mouse position on panel---------------------- |
;--------------------------------------------------------- |
PrintMousePos: |
|
pushad |
|
mov eax,[Window_SizeX] |
sub eax,75 |
mov ebx,20+15+6 |
347,8 → 293,6 |
mov esi,2 |
call print_text |
|
mov eax,47 |
mov ebx,4*65536 |
mov ecx,[ScreenX] |
add ecx,[PosX] |
mov edx,[Window_SizeX] |
356,10 → 300,8 |
shl edx,16 |
add edx,20+15+6+6 |
and esi,0 |
mcall |
mcall 47,<4,0> |
|
mov eax,47 |
mov ebx,4*65536 |
mov ecx,[ScreenY] |
add ecx,[PosY] |
mov edx,[Window_SizeX] |
366,92 → 308,16 |
sub edx,55 |
shl edx,16 |
add edx,20+15+6+18+1+6 |
and esi,0 |
mcall |
|
popad |
ret |
;---------------------------------------------------------- |
;---------------draw panel in window of program------------ |
;---------------------------------------------------------- |
draw_panel: |
|
mov eax,5 |
mov ebx,20 |
mov ecx,[Window_SizeX] |
mov edx,15 |
mov esi,6 |
sub ecx,10 |
call draw_volume_rectangle ; top menu - file and etc. |
|
;mov eax,5 |
;mov ebx,20 |
;mov ecx,[Window_SizeX] |
;mov edx,15 |
;mov esi,6 |
;sub ecx,10 |
;call draw_volume_rectangle |
|
mov eax,5 |
mov ebx,20+15+1 |
mov ecx,[Window_SizeX] |
mov edx,50 |
mov esi,1 |
sub ecx,10 |
call draw_volume_rectangle ; tools panel |
|
mov eax,5 |
mov ebx,20+15+1+50+1 |
mov ecx,[Window_SizeX] |
mov edx,[Window_SizeY] |
mov esi,1 |
sub ecx,10+20 |
sub edx,20+15+1+50+1+5+20 |
call draw_volume_rectangle ; picure area |
|
mov eax,5 |
mov ebx,[Window_SizeY] |
mov ecx,[Window_SizeX] |
mov edx,20+10 |
mov esi,3 |
sub ecx,30 |
sub ebx,25+10 |
call draw_volume_rectangle ; horizontal scrollbar |
|
mov eax,[Window_SizeX] |
mov ebx,20+15+1+49+2 |
mov ecx,20+10 |
mov edx,[Window_SizeY] |
mov esi,3 |
sub eax,25+10 |
sub edx,20+15+1+49+5+20 |
call draw_volume_rectangle ; vertical scrollbar |
|
mov eax,[Window_SizeX] |
mov ebx,[Window_SizeY] |
mov ecx,20+10 |
mov edx,20+10 |
mov esi,6 |
sub eax,25+10 |
sub ebx,25+10 |
call draw_volume_rectangle ; down and right small area |
|
;mov eax,445 |
;mov ebx,20+15+6 |
;mov ecx,37 |
;mov edx,37 |
;mov esi,4 |
;call draw_volume_rectangle |
|
ret |
|
|
;---------------------------------------------------------- |
;----------print text on the panel and menu---------------- |
;---------------------------------------------------------- |
print_panel_text: |
next_panel_text: |
|
mov eax,[edi] |
mov ebx,[edi+4] |
;xor ecx,ecx |
473,7 → 339,6 |
;------------draw lines of scoll--------------------------- |
;---------------------------------------------------------- |
draw_scrollers: |
|
mov edi,[CounterX] |
mov eax,[Scroll1CoordinatX] |
mov ebx,[Window_SizeY] |
487,17 → 352,13 |
mov [Scroll1MaxSizeY],edx |
mov [Scroll1MaxSizeX],ecx |
imul ecx,edi |
push eax |
push ebx |
push edx |
push eax ebx edx |
mov eax,ecx |
mov ebx,[Picture_SizeX] |
cdq |
idiv ebx |
mov ecx,eax |
pop edx |
pop ebx |
pop eax |
pop edx ebx eax |
mov [Scroll1SizeX],ecx |
mov edi,[Scroll1MaxSizeX] |
sub edi,ecx |
517,15 → 378,13 |
mov [Scroll2MaxSizeY],edx |
|
imul edx,[CounterY] |
push eax |
push ebx |
push eax ebx |
mov eax,edx |
mov ebx,[Picture_SizeY] |
cdq |
idiv ebx |
mov edx,eax |
pop ebx |
pop eax |
pop ebx eax |
mov [Scroll2SizeY],edx |
mov edi,[Scroll2MaxSizeY] |
sub edi,edx |
534,7 → 393,6 |
call draw_volume_rectangle |
|
ret |
ret |
|
button_menu_size_x dd 0 |
button_menu_size_y dd 0 |