Subversion Repositories Kolibri OS

Rev

Rev 6364 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
255 heavyiron 1
;---------------------------------------------------------
2
;------print mouse position on panel----------------------
3
;---------------------------------------------------------
4
PrintMousePos:
5
	pushad
1643 mario79 6
	mov	eax,[Window_SizeX]
6359 IgorA 7
	sub	eax,75+ci_offs_skin_w
8
	mov	ebx,ci_panel_y_pos+6
1643 mario79 9
	mov	ecx,52
10
	mov	edx,18
11
	mov	esi,4
6359 IgorA 12
	call draw_volume_rectangle ; border for mouse x pos
255 heavyiron 13
 
1643 mario79 14
	mov	eax,[Window_SizeX]
6359 IgorA 15
	sub	eax,75+ci_offs_skin_w
16
	mov	ebx,ci_panel_y_pos+6+18+4
1643 mario79 17
	mov	ecx,52
18
	mov	edx,18
19
	mov	esi,4
6359 IgorA 20
	call draw_volume_rectangle ; border for mouse y pos
255 heavyiron 21
 
1643 mario79 22
	mov	eax,[Window_SizeX]
6359 IgorA 23
	sub	eax,70+ci_offs_skin_w
24
	mov	ebx,ci_panel_y_pos+6+6
1643 mario79 25
	and	ecx,0
26
	mov	edx,mouse_pos_x
27
	mov	esi,2
6359 IgorA 28
	call print_text
255 heavyiron 29
 
1643 mario79 30
	mov	eax,[Window_SizeX]
6359 IgorA 31
	sub	eax,70+ci_offs_skin_w
32
	mov	ebx,ci_panel_y_pos+6+6+18+4
1643 mario79 33
	and	ecx,0
34
	mov	edx,mouse_pos_y
35
	mov	esi,2
6359 IgorA 36
	call print_text
255 heavyiron 37
 
1643 mario79 38
	mov	ecx,[ScreenX]
39
	add	ecx,[PosX]
40
	mov	edx,[Window_SizeX]
6359 IgorA 41
	sub	edx,55+ci_offs_skin_w
1643 mario79 42
	shl	edx,16
6359 IgorA 43
	add	edx,ci_panel_y_pos+6+6
1643 mario79 44
	and	esi,0
6358 IgorA 45
	mcall SF_DRAW_NUMBER,<4,0>
255 heavyiron 46
 
1643 mario79 47
	mov	ecx,[ScreenY]
48
	add	ecx,[PosY]
49
	mov	edx,[Window_SizeX]
6359 IgorA 50
	sub	edx,55+ci_offs_skin_w
1643 mario79 51
	shl	edx,16
6359 IgorA 52
	add	edx,ci_panel_y_pos+6+18+4+6
485 heavyiron 53
	mcall
255 heavyiron 54
 
55
	popad
56
	ret
57
 
58
;----------------------------------------------------------
59
;------------draw lines of scoll---------------------------
60
;----------------------------------------------------------
61
draw_scrollers:
1643 mario79 62
	mov	edi,[CounterX]
63
	mov	eax,[Scroll1CoordinatX]
64
	mov	ebx,[Window_SizeY]
6358 IgorA 65
	sub	ebx,(ci_scroll_dim-3)+5+ci_offs_skin_h
1643 mario79 66
	mov	ecx,[Window_SizeX]
6358 IgorA 67
	sub	ecx,ci_scroll_dim+5+4+ci_scrollh_coord_x_min+ci_offs_skin_w
68
	mov	edx,ci_scroll_dim-6
1643 mario79 69
	mov	esi,1
70
	mov	[Scroll1CoordinatY],ebx
71
	mov	[Scroll1MaxSizeY],edx
72
	mov	[Scroll1MaxSizeX],ecx
73
	imul	ecx,edi
74
	push	eax	ebx	edx
75
	mov	eax,ecx
76
	mov	ebx,[Picture_SizeX]
77
	cdq
78
	idiv	ebx
79
	mov	ecx,eax
80
	pop	edx	ebx	eax
81
	mov	[Scroll1SizeX],ecx
82
	mov	edi,[Scroll1MaxSizeX]
83
	sub	edi,ecx
84
	mov	[Scroll1FreeX],edi
6357 IgorA 85
	call draw_volume_rectangle ; horizontal scrollbar polzunok
255 heavyiron 86
 
1643 mario79 87
	mov	eax,[Window_SizeX]
6358 IgorA 88
	sub	eax,(ci_scroll_dim-3)+5+ci_offs_skin_w
1643 mario79 89
	mov	ebx,[Scroll2CoordinatY]
6358 IgorA 90
	mov	ecx,ci_scroll_dim-6
1643 mario79 91
	mov	edx,[Window_SizeY]
6358 IgorA 92
	sub	edx,ci_scroll_dim+5+4+ci_scrollv_coord_y_min+ci_offs_skin_h
1643 mario79 93
	mov	esi,1
94
	mov	[Scroll2CoordinatX],eax
95
	mov	[Scroll2MaxSizeX],ecx
96
	mov	[Scroll2MaxSizeY],edx
255 heavyiron 97
 
1643 mario79 98
	imul	edx,[CounterY]
99
	push	eax	ebx
100
	mov	eax,edx
101
	mov	ebx,[Picture_SizeY]
102
	cdq
103
	idiv	ebx
104
	mov	edx,eax
105
	pop	ebx	eax
106
	mov	[Scroll2SizeY],edx
107
	mov	edi,[Scroll2MaxSizeY]
108
	sub	edi,edx
109
	mov	[Scroll2FreeY],edi
6357 IgorA 110
	call draw_volume_rectangle ; vertical scrollbar polzunok
255 heavyiron 111
 
1643 mario79 112
	ret
255 heavyiron 113
 
1643 mario79 114
button_menu_size_x	dd 0
115
button_menu_size_y	dd 0