Subversion Repositories Kolibri OS

Rev

Rev 6328 | Rev 6357 | 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:
14
 
15
	 mov [Icon_X],7
16
	 mov [Icon_Y],20+15+4
17
 
18
	 ;draw panel picture
19
	 mov edx,[Icon_X]
20
	 shl edx,16
21
	 add edx,[Icon_Y]
22
	 mov ebx,[ScreenPointer]
6342 IgorA 23
	 add ebx,mem_screen
255 heavyiron 24
	 mov ecx,417*65536+46
6342 IgorA 25
	 mcall SF_PUT_IMAGE
255 heavyiron 26
 
27
 
28
	 ;main buttons of instrumnts
29
 
30
	 and [counter],0
2038 leency 31
	 mov [Icon_X],9
32
	 mov [Icon_Y],21+15+4+1
255 heavyiron 33
 
34
   main_buttons:
35
 
36
	 mov eax,8
37
	 mov ebx,[Icon_X]
38
	 mov ecx,[Icon_Y]
39
	 dec ebx
40
	 dec ecx
41
	 shl ebx,16
42
	 shl ecx,16
2038 leency 43
	 add ebx,18
44
	 add ecx,19
255 heavyiron 45
	 mov edx,[counter]
46
	 add edx,10
47
	 add edx,1000000000000000000000000000000b
485 heavyiron 48
	 mcall
255 heavyiron 49
 
50
 
51
	 add [Icon_X],22
52
 
53
	 inc [counter]
54
	 cmp [counter],19
55
	 jne main_buttons
56
 
57
 
58
	 ;buttons of brushes(and lines width)
59
	 and [counter],0
60
 
2038 leency 61
	 mov [Icon_X],8+1
255 heavyiron 62
	 mov [Icon_Y],20+15+4+25+1
63
 
64
	 next_button_brush:
65
 
66
	 mov eax,8
67
	 mov ebx,[Icon_X]
68
	 mov ecx,[Icon_Y]
69
	 dec ebx
70
	 dec ecx
71
	 shl ebx,16
72
	 shl ecx,16
2038 leency 73
	 add ebx,18
74
	 add ecx,19
255 heavyiron 75
	 mov edx,[counter]
76
	 add edx,40
77
	 add edx,1000000000000000000000000000000b
485 heavyiron 78
	 mcall
255 heavyiron 79
 
80
	 add [Icon_X],19
81
 
82
	 inc [counter]
83
	 cmp [counter],5
84
	 jne next_button_brush
85
 
86
 
87
	 ;buttons of zoom
88
	 and [counter],0
89
 
2038 leency 90
	 mov [Icon_X],8+155+1
255 heavyiron 91
	 mov [Icon_Y],20+15+4+25+1
92
 
93
	 next_button_zoom:
94
 
95
	 mov eax,8
96
	 mov ebx,[Icon_X]
97
	 mov ecx,[Icon_Y]
98
	 dec ebx
99
	 dec ecx
100
	 shl ebx,16
101
	 shl ecx,16
2038 leency 102
	 add ebx,18
103
	 add ecx,19
255 heavyiron 104
	 mov edx,[counter]
105
	 add edx,45
106
	 add edx,1000000000000000000000000000000b
485 heavyiron 107
	 mcall
255 heavyiron 108
 
109
	 add [Icon_X],19
110
 
111
	 inc [counter]
112
	 cmp [counter],6
113
	 jne next_button_zoom
114
 
115
 
116
	 ; button of palette
117
	 mov [Icon_X],7+105+1
2038 leency 118
	 mov [Icon_Y],19+15+4+25+1
255 heavyiron 119
 
120
	 mov eax,8
121
	 mov ebx,[Icon_X]
122
	 mov ecx,[Icon_Y]
123
	 dec ebx
124
	 dec ecx
125
	 shl ebx,16
126
	 shl ecx,16
127
	 add ebx,20
128
	 add ecx,21
129
	 mov edx,51
130
	 add edx,1000000000000000000000000000000b
485 heavyiron 131
	 mcall
255 heavyiron 132
 
133
	 ; button of color
134
	 mov [Icon_X],7+128+1
2038 leency 135
	 mov [Icon_Y],19+15+4+25+1
255 heavyiron 136
 
137
	 mov eax,8
138
	 mov ebx,[Icon_X]
139
	 mov ecx,[Icon_Y]
140
	 dec ebx
141
	 dec ecx
142
	 shl ebx,16
143
	 shl ecx,16
144
	 add ebx,20
2038 leency 145
	 add ecx,20
255 heavyiron 146
	 mov edx,52
147
	 add edx,1000000000000000000000000000000b
485 heavyiron 148
	 mcall
255 heavyiron 149
 
150
	 mov eax,13
2038 leency 151
	 mov ebx,136*65536+19
152
	 mov ecx,64*65536+19
255 heavyiron 153
	 mov edx,[Color]
485 heavyiron 154
	 mcall
255 heavyiron 155
 
156
	 ret