Subversion Repositories Kolibri OS

Rev

Rev 6359 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
255 heavyiron 1
;---------------------------------------------------------
2
;-----draw panel menu(main engin of panel)----------------
3
;---------------------------------------------------------
4
print_panel_menu:
1643 mario79 5
;delit main buttons(some time)
6
	mov	[counter],10
255 heavyiron 7
 
1643 mario79 8
next_icon_delit1:
9
	mov	edx,[counter]
10
	add	edx,11100000000000000000000000000000b
6358 IgorA 11
	mcall SF_DEFINE_BUTTON
1643 mario79 12
	inc	[counter]
13
	cmp	[counter],30
14
	jl	next_icon_delit1
255 heavyiron 15
 
6359 IgorA 16
	;delit buttons of brushes
1643 mario79 17
	mov	[counter],40
255 heavyiron 18
 
1643 mario79 19
next_icon_delit2:
20
	mov	edx,[counter]
21
	add	edx,11100000000000000000000000000000b
6358 IgorA 22
	mcall SF_DEFINE_BUTTON
1643 mario79 23
	inc	[counter]
24
	cmp	[counter],45
25
	jl	next_icon_delit2
255 heavyiron 26
 
6359 IgorA 27
	;delit buttons of zoom
1643 mario79 28
	mov	[counter],45
255 heavyiron 29
 
1643 mario79 30
next_icon_delit3:
31
	mov	edx,[counter]
32
	add	edx,11100000000000000000000000000000b
6358 IgorA 33
	mcall SF_DEFINE_BUTTON
1643 mario79 34
	inc	[counter]
35
	cmp	[counter],50
36
	jl	next_icon_delit3
255 heavyiron 37
 
1643 mario79 38
;delit buttons of palette
39
	mov	edx,51
40
	add	edx,11100000000000000000000000000000b
6358 IgorA 41
	mcall SF_DEFINE_BUTTON
255 heavyiron 42
 
1643 mario79 43
;delit buttons of color
44
	mov	edx,52
45
	add	edx,11100000000000000000000000000000b
6358 IgorA 46
	mcall SF_DEFINE_BUTTON
255 heavyiron 47
 
6358 IgorA 48
	call GetMouseCoordinats
255 heavyiron 49
 
1643 mario79 50
	and	[menu_counter],0
51
	and	[counter_11],0
255 heavyiron 52
 
6358 IgorA 53
	mcall SF_SLEEP,15
255 heavyiron 54
 
1643 mario79 55
	pusha
56
	call	drawwin
57
	popa
255 heavyiron 58
 
6359 IgorA 59
	mov	[number_panel],0
255 heavyiron 60
 
1643 mario79 61
	jmp	TakeInstruments
255 heavyiron 62
 
63
;---------------------------------------------------------
64
;------print mouse position on panel----------------------
65
;---------------------------------------------------------
66
PrintMousePos:
67
	pushad
1643 mario79 68
	mov	eax,[Window_SizeX]
6359 IgorA 69
	sub	eax,75+ci_offs_skin_w
70
	mov	ebx,ci_panel_y_pos+6
1643 mario79 71
	mov	ecx,52
72
	mov	edx,18
73
	mov	esi,4
6359 IgorA 74
	call draw_volume_rectangle ; border for mouse x pos
255 heavyiron 75
 
1643 mario79 76
	mov	eax,[Window_SizeX]
6359 IgorA 77
	sub	eax,75+ci_offs_skin_w
78
	mov	ebx,ci_panel_y_pos+6+18+4
1643 mario79 79
	mov	ecx,52
80
	mov	edx,18
81
	mov	esi,4
6359 IgorA 82
	call draw_volume_rectangle ; border for mouse y pos
255 heavyiron 83
 
1643 mario79 84
	mov	eax,[Window_SizeX]
6359 IgorA 85
	sub	eax,70+ci_offs_skin_w
86
	mov	ebx,ci_panel_y_pos+6+6
1643 mario79 87
	and	ecx,0
88
	mov	edx,mouse_pos_x
89
	mov	esi,2
6359 IgorA 90
	call print_text
255 heavyiron 91
 
1643 mario79 92
	mov	eax,[Window_SizeX]
6359 IgorA 93
	sub	eax,70+ci_offs_skin_w
94
	mov	ebx,ci_panel_y_pos+6+6+18+4
1643 mario79 95
	and	ecx,0
96
	mov	edx,mouse_pos_y
97
	mov	esi,2
6359 IgorA 98
	call print_text
255 heavyiron 99
 
1643 mario79 100
	mov	ecx,[ScreenX]
101
	add	ecx,[PosX]
102
	mov	edx,[Window_SizeX]
6359 IgorA 103
	sub	edx,55+ci_offs_skin_w
1643 mario79 104
	shl	edx,16
6359 IgorA 105
	add	edx,ci_panel_y_pos+6+6
1643 mario79 106
	and	esi,0
6358 IgorA 107
	mcall SF_DRAW_NUMBER,<4,0>
255 heavyiron 108
 
1643 mario79 109
	mov	ecx,[ScreenY]
110
	add	ecx,[PosY]
111
	mov	edx,[Window_SizeX]
6359 IgorA 112
	sub	edx,55+ci_offs_skin_w
1643 mario79 113
	shl	edx,16
6359 IgorA 114
	add	edx,ci_panel_y_pos+6+18+4+6
485 heavyiron 115
	mcall
255 heavyiron 116
 
117
	popad
118
	ret
119
 
120
;----------------------------------------------------------
121
;------------draw lines of scoll---------------------------
122
;----------------------------------------------------------
123
draw_scrollers:
1643 mario79 124
	mov	edi,[CounterX]
125
	mov	eax,[Scroll1CoordinatX]
126
	mov	ebx,[Window_SizeY]
6358 IgorA 127
	sub	ebx,(ci_scroll_dim-3)+5+ci_offs_skin_h
1643 mario79 128
	mov	ecx,[Window_SizeX]
6358 IgorA 129
	sub	ecx,ci_scroll_dim+5+4+ci_scrollh_coord_x_min+ci_offs_skin_w
130
	mov	edx,ci_scroll_dim-6
1643 mario79 131
	mov	esi,1
132
	mov	[Scroll1CoordinatY],ebx
133
	mov	[Scroll1MaxSizeY],edx
134
	mov	[Scroll1MaxSizeX],ecx
135
	imul	ecx,edi
136
	push	eax	ebx	edx
137
	mov	eax,ecx
138
	mov	ebx,[Picture_SizeX]
139
	cdq
140
	idiv	ebx
141
	mov	ecx,eax
142
	pop	edx	ebx	eax
143
	mov	[Scroll1SizeX],ecx
144
	mov	edi,[Scroll1MaxSizeX]
145
	sub	edi,ecx
146
	mov	[Scroll1FreeX],edi
6357 IgorA 147
	call draw_volume_rectangle ; horizontal scrollbar polzunok
255 heavyiron 148
 
1643 mario79 149
	mov	eax,[Window_SizeX]
6358 IgorA 150
	sub	eax,(ci_scroll_dim-3)+5+ci_offs_skin_w
1643 mario79 151
	mov	ebx,[Scroll2CoordinatY]
6358 IgorA 152
	mov	ecx,ci_scroll_dim-6
1643 mario79 153
	mov	edx,[Window_SizeY]
6358 IgorA 154
	sub	edx,ci_scroll_dim+5+4+ci_scrollv_coord_y_min+ci_offs_skin_h
1643 mario79 155
	mov	esi,1
156
	mov	[Scroll2CoordinatX],eax
157
	mov	[Scroll2MaxSizeX],ecx
158
	mov	[Scroll2MaxSizeY],edx
255 heavyiron 159
 
1643 mario79 160
	imul	edx,[CounterY]
161
	push	eax	ebx
162
	mov	eax,edx
163
	mov	ebx,[Picture_SizeY]
164
	cdq
165
	idiv	ebx
166
	mov	edx,eax
167
	pop	ebx	eax
168
	mov	[Scroll2SizeY],edx
169
	mov	edi,[Scroll2MaxSizeY]
170
	sub	edi,edx
171
	mov	[Scroll2FreeY],edi
6357 IgorA 172
	call draw_volume_rectangle ; vertical scrollbar polzunok
255 heavyiron 173
 
1643 mario79 174
	ret
255 heavyiron 175
 
1643 mario79 176
button_menu_size_x	dd 0
177
button_menu_size_y	dd 0