2006-12-29 15:50:24 +01:00
|
|
|
;---------------------------------------------------------
|
|
|
|
;-----draw panel menu(main engin of panel)----------------
|
|
|
|
;---------------------------------------------------------
|
|
|
|
print_panel_menu:
|
2010-10-04 22:40:19 +02:00
|
|
|
;delit main buttons(some time)
|
|
|
|
mov [counter],10
|
|
|
|
|
|
|
|
next_icon_delit1:
|
|
|
|
mov edx,[counter]
|
|
|
|
add edx,11100000000000000000000000000000b
|
2016-03-19 20:38:56 +01:00
|
|
|
mcall SF_DEFINE_BUTTON
|
2010-10-04 22:40:19 +02:00
|
|
|
inc [counter]
|
|
|
|
cmp [counter],30
|
|
|
|
jl next_icon_delit1
|
|
|
|
|
2016-03-21 18:29:30 +01:00
|
|
|
;delit buttons of brushes
|
2010-10-04 22:40:19 +02:00
|
|
|
mov [counter],40
|
|
|
|
|
|
|
|
next_icon_delit2:
|
|
|
|
mov edx,[counter]
|
|
|
|
add edx,11100000000000000000000000000000b
|
2016-03-19 20:38:56 +01:00
|
|
|
mcall SF_DEFINE_BUTTON
|
2010-10-04 22:40:19 +02:00
|
|
|
inc [counter]
|
|
|
|
cmp [counter],45
|
|
|
|
jl next_icon_delit2
|
|
|
|
|
2016-03-21 18:29:30 +01:00
|
|
|
;delit buttons of zoom
|
2010-10-04 22:40:19 +02:00
|
|
|
mov [counter],45
|
|
|
|
|
|
|
|
next_icon_delit3:
|
|
|
|
mov edx,[counter]
|
|
|
|
add edx,11100000000000000000000000000000b
|
2016-03-19 20:38:56 +01:00
|
|
|
mcall SF_DEFINE_BUTTON
|
2010-10-04 22:40:19 +02:00
|
|
|
inc [counter]
|
|
|
|
cmp [counter],50
|
|
|
|
jl next_icon_delit3
|
|
|
|
|
|
|
|
;delit buttons of palette
|
|
|
|
mov edx,51
|
|
|
|
add edx,11100000000000000000000000000000b
|
2016-03-19 20:38:56 +01:00
|
|
|
mcall SF_DEFINE_BUTTON
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
;delit buttons of color
|
|
|
|
mov edx,52
|
|
|
|
add edx,11100000000000000000000000000000b
|
2016-03-19 20:38:56 +01:00
|
|
|
mcall SF_DEFINE_BUTTON
|
2010-10-04 22:40:19 +02:00
|
|
|
|
2016-03-19 20:38:56 +01:00
|
|
|
call GetMouseCoordinats
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
and [menu_counter],0
|
|
|
|
and [counter_11],0
|
|
|
|
|
2016-03-19 20:38:56 +01:00
|
|
|
mcall SF_SLEEP,15
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
pusha
|
|
|
|
call drawwin
|
|
|
|
popa
|
|
|
|
|
2016-03-21 18:29:30 +01:00
|
|
|
mov [number_panel],0
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
jmp TakeInstruments
|
2006-12-29 15:50:24 +01:00
|
|
|
|
|
|
|
;---------------------------------------------------------
|
|
|
|
;------print mouse position on panel----------------------
|
|
|
|
;---------------------------------------------------------
|
|
|
|
PrintMousePos:
|
|
|
|
pushad
|
2010-10-04 22:40:19 +02:00
|
|
|
mov eax,[Window_SizeX]
|
2016-03-21 18:29:30 +01:00
|
|
|
sub eax,75+ci_offs_skin_w
|
|
|
|
mov ebx,ci_panel_y_pos+6
|
2010-10-04 22:40:19 +02:00
|
|
|
mov ecx,52
|
|
|
|
mov edx,18
|
|
|
|
mov esi,4
|
2016-03-21 18:29:30 +01:00
|
|
|
call draw_volume_rectangle ; border for mouse x pos
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
mov eax,[Window_SizeX]
|
2016-03-21 18:29:30 +01:00
|
|
|
sub eax,75+ci_offs_skin_w
|
|
|
|
mov ebx,ci_panel_y_pos+6+18+4
|
2010-10-04 22:40:19 +02:00
|
|
|
mov ecx,52
|
|
|
|
mov edx,18
|
|
|
|
mov esi,4
|
2016-03-21 18:29:30 +01:00
|
|
|
call draw_volume_rectangle ; border for mouse y pos
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
mov eax,[Window_SizeX]
|
2016-03-21 18:29:30 +01:00
|
|
|
sub eax,70+ci_offs_skin_w
|
|
|
|
mov ebx,ci_panel_y_pos+6+6
|
2010-10-04 22:40:19 +02:00
|
|
|
and ecx,0
|
|
|
|
mov edx,mouse_pos_x
|
|
|
|
mov esi,2
|
2016-03-21 18:29:30 +01:00
|
|
|
call print_text
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
mov eax,[Window_SizeX]
|
2016-03-21 18:29:30 +01:00
|
|
|
sub eax,70+ci_offs_skin_w
|
|
|
|
mov ebx,ci_panel_y_pos+6+6+18+4
|
2010-10-04 22:40:19 +02:00
|
|
|
and ecx,0
|
|
|
|
mov edx,mouse_pos_y
|
|
|
|
mov esi,2
|
2016-03-21 18:29:30 +01:00
|
|
|
call print_text
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
mov ecx,[ScreenX]
|
|
|
|
add ecx,[PosX]
|
|
|
|
mov edx,[Window_SizeX]
|
2016-03-21 18:29:30 +01:00
|
|
|
sub edx,55+ci_offs_skin_w
|
2010-10-04 22:40:19 +02:00
|
|
|
shl edx,16
|
2016-03-21 18:29:30 +01:00
|
|
|
add edx,ci_panel_y_pos+6+6
|
2010-10-04 22:40:19 +02:00
|
|
|
and esi,0
|
2016-03-19 20:38:56 +01:00
|
|
|
mcall SF_DRAW_NUMBER,<4,0>
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
mov ecx,[ScreenY]
|
|
|
|
add ecx,[PosY]
|
|
|
|
mov edx,[Window_SizeX]
|
2016-03-21 18:29:30 +01:00
|
|
|
sub edx,55+ci_offs_skin_w
|
2010-10-04 22:40:19 +02:00
|
|
|
shl edx,16
|
2016-03-21 18:29:30 +01:00
|
|
|
add edx,ci_panel_y_pos+6+18+4+6
|
2007-05-10 15:48:35 +02:00
|
|
|
mcall
|
2006-12-29 15:50:24 +01:00
|
|
|
|
|
|
|
popad
|
|
|
|
ret
|
|
|
|
|
|
|
|
;----------------------------------------------------------
|
|
|
|
;------------draw lines of scoll---------------------------
|
|
|
|
;----------------------------------------------------------
|
|
|
|
draw_scrollers:
|
2010-10-04 22:40:19 +02:00
|
|
|
mov edi,[CounterX]
|
|
|
|
mov eax,[Scroll1CoordinatX]
|
|
|
|
mov ebx,[Window_SizeY]
|
2016-03-19 20:38:56 +01:00
|
|
|
sub ebx,(ci_scroll_dim-3)+5+ci_offs_skin_h
|
2010-10-04 22:40:19 +02:00
|
|
|
mov ecx,[Window_SizeX]
|
2016-03-19 20:38:56 +01:00
|
|
|
sub ecx,ci_scroll_dim+5+4+ci_scrollh_coord_x_min+ci_offs_skin_w
|
|
|
|
mov edx,ci_scroll_dim-6
|
2010-10-04 22:40:19 +02:00
|
|
|
mov esi,1
|
|
|
|
mov [Scroll1CoordinatY],ebx
|
|
|
|
mov [Scroll1MaxSizeY],edx
|
|
|
|
mov [Scroll1MaxSizeX],ecx
|
|
|
|
imul ecx,edi
|
|
|
|
push eax ebx edx
|
|
|
|
mov eax,ecx
|
|
|
|
mov ebx,[Picture_SizeX]
|
|
|
|
cdq
|
|
|
|
idiv ebx
|
|
|
|
mov ecx,eax
|
|
|
|
pop edx ebx eax
|
|
|
|
mov [Scroll1SizeX],ecx
|
|
|
|
mov edi,[Scroll1MaxSizeX]
|
|
|
|
sub edi,ecx
|
|
|
|
mov [Scroll1FreeX],edi
|
2016-03-19 10:57:37 +01:00
|
|
|
call draw_volume_rectangle ; horizontal scrollbar polzunok
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
mov eax,[Window_SizeX]
|
2016-03-19 20:38:56 +01:00
|
|
|
sub eax,(ci_scroll_dim-3)+5+ci_offs_skin_w
|
2010-10-04 22:40:19 +02:00
|
|
|
mov ebx,[Scroll2CoordinatY]
|
2016-03-19 20:38:56 +01:00
|
|
|
mov ecx,ci_scroll_dim-6
|
2010-10-04 22:40:19 +02:00
|
|
|
mov edx,[Window_SizeY]
|
2016-03-19 20:38:56 +01:00
|
|
|
sub edx,ci_scroll_dim+5+4+ci_scrollv_coord_y_min+ci_offs_skin_h
|
2010-10-04 22:40:19 +02:00
|
|
|
mov esi,1
|
|
|
|
mov [Scroll2CoordinatX],eax
|
|
|
|
mov [Scroll2MaxSizeX],ecx
|
|
|
|
mov [Scroll2MaxSizeY],edx
|
|
|
|
|
|
|
|
imul edx,[CounterY]
|
|
|
|
push eax ebx
|
|
|
|
mov eax,edx
|
|
|
|
mov ebx,[Picture_SizeY]
|
|
|
|
cdq
|
|
|
|
idiv ebx
|
|
|
|
mov edx,eax
|
|
|
|
pop ebx eax
|
|
|
|
mov [Scroll2SizeY],edx
|
|
|
|
mov edi,[Scroll2MaxSizeY]
|
|
|
|
sub edi,edx
|
|
|
|
mov [Scroll2FreeY],edi
|
2016-03-19 10:57:37 +01:00
|
|
|
call draw_volume_rectangle ; vertical scrollbar polzunok
|
2010-10-04 22:40:19 +02:00
|
|
|
|
|
|
|
ret
|
2006-12-29 15:50:24 +01:00
|
|
|
|
2010-10-04 22:40:19 +02:00
|
|
|
button_menu_size_x dd 0
|
|
|
|
button_menu_size_y dd 0
|