Subversion Repositories Kolibri OS

Rev

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

Rev Author Line No. Line
255 heavyiron 1
;-----------------------------------------------------------
2
;---load icons  in memory and draw icons on panel-----------
3
;-----------------------------------------------------------
4
load_icons:
6328 IgorA 5
	stdcall [img_decode], panel_picture, panel_picture.end-panel_picture, 0
6
	mov ebx,eax
7
	mov edi,[ScreenPointer]
6342 IgorA 8
	add edi,mem_screen
6328 IgorA 9
	stdcall [img_to_rgb2], ebx,edi ;преобразуем изображение к формату rgb
10
	stdcall [img_destroy], ebx ;удаляем временный буфер с параметрами изображения
11
	ret
255 heavyiron 12
 
13
draw_icons:
6359 IgorA 14
	mov [Icon_X],ci_panel_x_pos+2
15
	mov [Icon_Y],ci_panel_y_pos+3
255 heavyiron 16
 
17
	 ;draw panel picture
18
	 mov edx,[Icon_X]
19
	 shl edx,16
20
	 add edx,[Icon_Y]
21
	 mov ebx,[ScreenPointer]
6342 IgorA 22
	 add ebx,mem_screen
255 heavyiron 23
	 mov ecx,417*65536+46
6342 IgorA 24
	 mcall SF_PUT_IMAGE
255 heavyiron 25
 
26
 
27
	 ;main buttons of instrumnts
28
 
29
	 and [counter],0
6359 IgorA 30
	 mov [Icon_X],ci_panel_x_pos+4
255 heavyiron 31
 
32
   main_buttons:
33
 
34
	 mov ebx,[Icon_X]
6359 IgorA 35
	 mov ecx,ci_panel_but_y1
255 heavyiron 36
	 dec ebx
37
	 dec ecx
38
	 shl ebx,16
39
	 shl ecx,16
2038 leency 40
	 add ebx,18
41
	 add ecx,19
255 heavyiron 42
	 mov edx,[counter]
43
	 add edx,10
44
	 add edx,1000000000000000000000000000000b
6357 IgorA 45
	 mcall SF_DEFINE_BUTTON
255 heavyiron 46
 
47
 
48
	 add [Icon_X],22
49
 
50
	 inc [counter]
51
	 cmp [counter],19
52
	 jne main_buttons
53
 
54
 
55
	 ;buttons of brushes(and lines width)
56
	 and [counter],0
57
 
6359 IgorA 58
	 mov [Icon_X],ci_panel_x_pos+4
255 heavyiron 59
 
60
	 next_button_brush:
61
 
62
	 mov ebx,[Icon_X]
6359 IgorA 63
	 mov ecx,ci_panel_but_y2
255 heavyiron 64
	 dec ebx
65
	 dec ecx
66
	 shl ebx,16
67
	 shl ecx,16
2038 leency 68
	 add ebx,18
69
	 add ecx,19
255 heavyiron 70
	 mov edx,[counter]
71
	 add edx,40
72
	 add edx,1000000000000000000000000000000b
6357 IgorA 73
	 mcall SF_DEFINE_BUTTON
255 heavyiron 74
 
75
	 add [Icon_X],19
76
 
77
	 inc [counter]
78
	 cmp [counter],5
79
	 jne next_button_brush
80
 
81
 
82
	 ;buttons of zoom
83
	 and [counter],0
84
 
6359 IgorA 85
	 mov [Icon_X],ci_panel_x_pos+159
255 heavyiron 86
 
87
	 next_button_zoom:
88
 
89
	 mov ebx,[Icon_X]
6359 IgorA 90
	 mov ecx,ci_panel_but_y2
255 heavyiron 91
	 dec ebx
92
	 dec ecx
93
	 shl ebx,16
94
	 shl ecx,16
2038 leency 95
	 add ebx,18
96
	 add ecx,19
255 heavyiron 97
	 mov edx,[counter]
98
	 add edx,45
99
	 add edx,1000000000000000000000000000000b
6357 IgorA 100
	 mcall SF_DEFINE_BUTTON
255 heavyiron 101
 
102
	 add [Icon_X],19
103
 
104
	 inc [counter]
105
	 cmp [counter],6
106
	 jne next_button_zoom
107
 
108
 
109
	 ; button of palette
6359 IgorA 110
	 mov [Icon_X],ci_panel_x_pos+108
255 heavyiron 111
 
112
	 mov ebx,[Icon_X]
6359 IgorA 113
	 mov ecx,ci_panel_but_y2-1
255 heavyiron 114
	 dec ebx
115
	 dec ecx
116
	 shl ebx,16
117
	 shl ecx,16
118
	 add ebx,20
119
	 add ecx,21
120
	 mov edx,51
121
	 add edx,1000000000000000000000000000000b
6357 IgorA 122
	 mcall SF_DEFINE_BUTTON
255 heavyiron 123
 
124
	 ; button of color
6359 IgorA 125
	 mov [Icon_X],ci_panel_x_pos+131
255 heavyiron 126
 
127
	 mov ebx,[Icon_X]
6360 IgorA 128
	 mov ecx,ci_panel_but_y2-1
255 heavyiron 129
	 dec ebx
130
	 dec ecx
131
	 shl ebx,16
132
	 shl ecx,16
133
	 add ebx,20
2038 leency 134
	 add ecx,20
255 heavyiron 135
	 mov edx,52
136
	 add edx,1000000000000000000000000000000b
6357 IgorA 137
	 mcall SF_DEFINE_BUTTON
255 heavyiron 138
 
6359 IgorA 139
	mcall SF_DRAW_RECT, ((ci_panel_x_pos+130) shl 16)+21,\
140
		((ci_panel_y_pos+28) shl 16)+21, [Color]
255 heavyiron 141
 
6359 IgorA 142
	ret