Subversion Repositories Kolibri OS

Rev

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

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